Re: Universal Binaries for an app built with different SDK versions
Re: Universal Binaries for an app built with different SDK versions
- Subject: Re: Universal Binaries for an app built with different SDK versions
- From: Steve Mills <email@hidden>
- Date: Tue, 17 Jan 2006 15:58:02 -0600
On Jan 13, 2006, at 11:21 AM, Eric Albert wrote:
The setting causes the strip command-line tool to be used to strip
the binary instead of the linker. But Daniel's conclusion is a bit
backwards -- the linker has more information about how the binary
is built, so it can do a better job of stripping the executable.
SEPARATE_STRIP exists as a setting because over the years there
have sometimes been a few problems where using the linker to strip
the binary would cause linking to fail. If you don't need it,
though, using the linker to strip (as Xcode does by default) is
better.
So I finally got a chance to look at code size and stripping today
after converting one of our small projects to Xcode. (When I say
small, I mean the app code is only a couple hundred lines, but the
supporting app framework is still there.) The executable is 28M - the
CW version is 1.7M. I checked the project settings and everything
with "strip" in its name is turned on. I read strip's man page and
wasn't sure of which options I should use, to I just typed "strip /
path/to/app/executable" and it magically (at least it's magic to me)
reduced it to 1.2M. Of course, I guess I should be using one of
strip's options, because when I sample it there are no function names
(which I'd prefer to keep). Any hints?
Or maybe I'm confused about what "strip" can do. Can it only strip
debugging info or can it also strip dead code?
Hang on. I was looking through the project settings for the Release
config again and noticed that Generate Debug Symbols was turned on
(by default - I didn't do it - seems wrong to me). Level of Debug
Symbols was set to All Symbols, because I had Dead Code Stripping
turned on, which says All Symbols must be used. So I turned off
Generate Debug Symbols and it resulted in an executable of only 1.8M!
Sampling still shows function names. Now I'm more confused on what
exactly Xcode's description of "debug symbols" is talking about in
the various project settings.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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