Linker exposing private symbols

Michael Matz matz@suse.de
Mon Aug 27 15:44:00 GMT 2018


Hi,

On Mon, 27 Aug 2018, Jeffrey Walton wrote:

> > That one is confusing compiling and linking.
> 
> Yeah, we need to see the compile and link command. To hazard a guess, he 
> is adding -fvisibility=hidden but after the compiler drives link he is 
> getting unwanted symbols in the shared object. The toolchain is not 
> doing what the user expect.

Because the expectations are wrong.  -fvisibility=hidden is a compile time 
option, no link time option.  It has no effect whatsoever while linking.

> The common theme is the user explicitly requests all symbols to be
> private with -fvisibility=hidden

The user might wish that that option is requesting this, but that doesn't 
make it true.  I'm not sure what you're trying to get at.


Ciao,
Michael.



More information about the Binutils mailing list