• 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
Re: what's supposed to get stripped?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what's supposed to get stripped?


  • Subject: Re: what's supposed to get stripped?
  • From: Steve Christensen <email@hidden>
  • Date: Thu, 30 Mar 2006 12:48:40 -0800

Well, it -does- seem to be stripping out most of the symbols - certainly all my internal method names, etc. - but it seems like dead code stripping isn't catching all the unused bits. I'm just trying to narrow this down to a linker issue or pilot error. I've certainly flown into mountainsides before... :-)

Thanks, Allen.


On Mar 30, 2006, at 9:05 AM, Allen Cronce wrote:

If you search the list archives, you'll find a thread with the subject "Symbol stripping tips + handy script" that covers this subject pretty well. Although it's somewhat overkill in my opinion.

My experience is that if you use the following "Release" build configuration settings for a bundle, you'll get pretty much the best results with minimal hassle:

Dead code stripping
Don't dead-strip inits and terms
Deployment preprocessing
Use separate strip
Strip style = Non-global symbols

Note that "Deployment preprocessing" is very important. Without it, I've found that the separate strip is not run. Go figure.

Also, your mileage may vary on the "Strip style". For bundles I prefer "Non-global symbols". But for applications you probably want to strip all symbols. Which strip style is best for you may be different based on the type of executable you're building and how (or if) you export your symbols.

You might want to manually strip your executable from the command line in order to experiment with the strip options and figure out what works best for you. Once you've got that working, then configure your project to do it for you during the build process.


Steve Christensen wrote:
I have a bunch of iMovie plug-in projects that I moved from CodeWarrior to Xcode (2.2.1) as part of moving to UB. Since there is a lot of shared code, I first build that as a separate static library that gets linked with all the plug-ins as they are built.

I've been noticing that the plug-in executable size has grown by considerably more than twice the previous PPC-only size. When I say considerable, I mean a 48K PPC-only executable growing to a 196K PPC+Intel executable.

I have dead code stripping turned on as well as symbol stripping (both ld and strip) and even a separate exported symbols file (all I want to export is main). Level of debug symbols is set to full, per Xcode's note that stripping works better that way.

When I run "nm -mg" on a plug-in's executable, I see that there are a lot of extra import symbols when compared with a plug-in built by CodeWarrior. After tracking it down more, it looks like some unreferenced non-virtual class methods are being included and thus dragging along the Mac OS API symbols and any other methods they use.

Am I missing something very basic here, or what? It's frustrating because I can't see anything else to turn on that would strip further.

I have a test project that shows what's happening that I can mail off-list if that will help.

steve

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40earthlink.net


This email sent to email@hidden

_______________________________________________
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

_______________________________________________ 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
References: 
 >what's supposed to get stripped? (From: Steve Christensen <email@hidden>)
 >Re: what's supposed to get stripped? (From: Allen Cronce <email@hidden>)

  • Prev by Date: Source Trees?
  • Next by Date: Re: Source Trees?
  • Previous by thread: Re: what's supposed to get stripped?
  • Next by thread: XCode Debugging Preference Panes
  • Index(es):
    • Date
    • Thread