Re: strip "safety"
Re: strip "safety"
- Subject: Re: strip "safety"
- From: Jim Ingham <email@hidden>
- Date: Thu, 17 Mar 2005 09:05:26 -0800
Felix,
On Mar 17, 2005, at 3:33 AM, Felix Schwarz wrote:
Hi,
I'm using
strip myexecutable
to strip unnecessary symbols from my executable and reduce it in
size. My app continues to start up and work fine. One question,
though:
When do all symbols in an executable get resolved? On launch time
or dynamically during the execution of the program?
Both... All the internal references to symbols provided by your app
are resolved at link time. That is why it is safe to strip an app
completely, the references within the app to all the symbols it
provides have already been bound up. References to symbols in shared
libraries are done through stubs that look up the symbol at runtime.
But strip doesn't remove these stubs, so there's no worry there...
Or, asked differently: Do I still have to fear lacking symbol
information in an executable if it started up fine?
No, with one proviso. If you have any kind of plugin architecture
where you are going to load bundles into your app that will then call
into functions in your main executable, then you have to make sure
not to strip the symbols that your plugins might call. Usually you
can use an export list for this purpose.
Also, is it still possible to make any use of the logs of
CrashReporter using the function addresses (since function names
can't be provided any more after stripping)?
Not from the stripped version, no. The best thing to do here is to
archive a copy of the unstripped version of your app. There is a
tool called atos that will take an address and the symbol-full
version of the app and return the symbol that the address resolves
to, and you can use that to run over CrashReporter logs and put the
symbols back.
Jim
_______________________________________________
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