• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
dead stripping not working in intel build?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: dead stripping not working in intel build? & Re: dead-code stripping, pass two...
      • From: Rua Haszard Morris <email@hidden>
  • Prev by Date: Throws SecurityException when merge my jar?
  • Next by Date: Re: how to link to separate libs for i386 (10.4) and PPC (10.3.9) link
  • Previous by thread: Throws SecurityException when merge my jar?
  • Next by thread: Re: dead stripping not working in intel build? & Re: dead-code stripping, pass two...
  • Index(es):
    • Date
    • Thread