dead stripping not working in intel build?
dead stripping not working in intel build?
- Subject: dead stripping not working in intel build?
- From: Rua Haszard Morris <email@hidden>
- Date: Wed, 17 May 2006 14:26:35 +1200
I am having trouble linking the i386 portion of a binary with dead
stripping turned on. The project compiles a lot of code, not all of
which is used, and uses an export file to ensure that all the unused
code is dead stripped. This is necessary as some of this code calls
other routines that are not compiled into this target - without the
export file the project doesn't link.
All this works perfectly well in the ppc build, but the i386 build
fails due to an undefined symbols linker error. The undefined symbols
listed are all those that are supposed to be dead-stripped.
Is there an explanation for this? Can anybody think of a good
workaround? Note that splitting the unused (in this project) code
into separate modules is not a practical solution.
To clarify here's an example:
main.cpp:
void ExportedFunction() // exported via the export file
{
LibFunction();
}
lib.cpp:
void LibFunction()
{
}
void ShouldBeDeadStripped() // this function is not called from
anything exported, so is dead stripped (except in i386!)
// (moving this function to another cpp file would solve the issue,
but dead stripping should too)
{
UnavailableFunc(); // undefined symbol
SomethingThatWeCantLink(); // undefined symbol
}
Thanks in advance for any help,
Rua HM.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden