Re: More Stripping Questions
Re: More Stripping Questions
- Subject: Re: More Stripping Questions
- From: Jonas Maebe <email@hidden>
- Date: Thu, 15 Oct 2009 13:52:08 +0200
On 13 Oct 2009, at 23:04, David Blanton wrote:
I have done strip -x -S on a C++ BSD static library.
When I look at the result with a hex editor I see the mangled names,
i.e __ZNsomethingdescriptive.
It seems to me that a 'snooper' could look at my lib and by reading
the descriptive info in the mangled name get a sense of what is
going on.
Linking, be it static or dynamic, happens based on symbol names. So
you can *never* strip all symbols from a (dynamic or static) library,
or the library would become completely useless: it would just become a
blob of contiguous code that is just as meaningless to the linker as
to any "snooper".
On the other hand, unless you distribute the library itself to other
developers for linking their code against it (in which you have no
choice but to include the symbol names), your end users will never
receive that library itself (unless you explicitly copy the static
library into your program bundle, but in that case the answer is
simply "don't do that").
A static library is just an archive of object files that is consulted
by the linker when you link your program or dynamic library/framework/
bundle. The linker will extract the object files/functions it needs
and copy those into the binary. You can then strip this binary to
remove the unnecessary symbol names.
Jonas
_______________________________________________
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