• 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: More Stripping Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >More Stripping Questions (From: David Blanton <email@hidden>)

  • Prev by Date: Re: suboptimal code-gen of decrement in GCC 4.2.1
  • Next by Date: Snow Leopard's DTrace does not enable some probes?
  • Previous by thread: More Stripping Questions
  • Next by thread: trying to add helper app to bundle
  • Index(es):
    • Date
    • Thread