Re: Building with "Symbols Hidden by Default" enabled/-fvisibility=hidden, but still receiving duplicate symbols.
Re: Building with "Symbols Hidden by Default" enabled/-fvisibility=hidden, but still receiving duplicate symbols.
- Subject: Re: Building with "Symbols Hidden by Default" enabled/-fvisibility=hidden, but still receiving duplicate symbols.
- From: Wim Lewis <email@hidden>
- Date: Mon, 11 Apr 2011 12:04:58 -0700
On 11 Apr 2011, at 11:34 AM, Chris Cleeland wrote:
> I may be wrong, but I believe that visibility only comes into play
> with DSOs, i.e., dynamically shared objects. It has nothing to do
> with static linking.
I think this is right --- the symbol is only made static / stripped / invisible when linking the individual object files into the final executable. The static-lib step doesn't involve the linker, so the symbols' visibility can't change then.
Depending on what you're doing, can you produce a single .o file (instead of a .a static-lib) and use the exported symbols list to limit externally visible symbols? (Xcode settings "Single-Object Prelink / GENERATE_MASTER_OBJECT_FILE" and "EXPORTED_SYMBOLS_FILE".) You would no longer have the static-lib feature of including only the objects necessary for your program, but otherwise I think this would do what you want.
_______________________________________________
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