Hiding Symbols in Static Libraries
Hiding Symbols in Static Libraries
- Subject: Hiding Symbols in Static Libraries
- From: Josh Ferguson <email@hidden>
- Date: Fri, 30 Mar 2007 14:50:33 -0500
I'm currently perplexed at how to hide symbols in static libraries. I
have a library that includes several software elements (including
gzip capability, rsa, and md5 implementations). Its source files are
numerous, so many symbols end up being "external". However, I only
need a very limited number of symbols to actually get exported and be
available to the end user - and further-more I don't want the users
of the library to run into problems multiple definition errors
between the numerous "external" symbols in my library and ones
included with system libraries.
I tried performing "strip -x" and "strip -s <export file>" on the
library, but find that ALL external symbols remain when I perform an
"nm -g" on the file. I tried specifying functions as
__private_extern__ and even after performing a strip those symbols
still showed up as "private external" symbols when performing nm -g.
I'm sure that I'm simply misunderstanding something here, but does
anyone have any recommendations on how I go about achieving what I'm
looking for - that is, to make sure that ONLY the specified external
symbols show up in the library and no other symbols will cause
multiple definition errors when compiled against libraries that
define the same symbols.
Thanks!
Josh
_______________________________________________
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