Re: How to not include function names in dylib?
Re: How to not include function names in dylib?
- Subject: Re: How to not include function names in dylib?
- From: "Peter O'Gorman" <email@hidden>
- Date: Thu, 24 Aug 2006 21:27:05 +0900
On Aug 24, 2006, at 4:22 AM, Christian Schmitz wrote:
Hi,
gcc does include function names in dylibs here. How do I prevent that?
Has someone an idea?
I only want one function to be named in the file (and all imports),
but
not the private functions.
PS: I tried with gcc and xcode and various options, but did not get it
done.
Your best bet i s to ensure that -fvisibility=hidden is passed to the
compiler by default, and then explicity export the functions that you
want to export with __attribute__((visibility("default"))).
If you are unable to do this, you can use the -exported_symbols_list
flag to ld to export only those symbols that you need.
If you just want to change a dylib that you already have without
rebuilding everything then use nmedit(1).
There are xcode GUI options for setting up the first two choices,
"Symbols Hidden by Default" and"Exported Symbols File".
Once you have done this, strip -x should make you happy, well,
happier anyway.
Hope this helps,
Peter
_______________________________________________
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