This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker exposing private symbols


On Mon, Aug 27, 2018 at 10:48 AM, Michael Matz <matz@suse.de> wrote:
> ...
>> There's nothing special about me. Others have encountered the same,
>> like https://stackoverflow.com/q/2222162/608639 and
>
> 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.

>> https://stackoverflow.com/q/37934388/608639 .
>
> And that one is misreading output of nm.

Yeah, my bad. Here's another example:
https://stackoverflow.com/q/1601900/608639.

The common theme is the user explicitly requests all symbols to be
private with -fvisibility=hidden (sans what is explicitly exported)
but that's not happening once the toolchain works its magic.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]