This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker exposing private symbols
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Alan Modra <amodra at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 27 Aug 2018 11:18:33 -0400
- Subject: Re: Linker exposing private symbols
- References: <CAH8yC8m5obs+uMMC0oVy-HMkbpAZz319fpkigxTGsnm=eX0hfA@mail.gmail.com> <20180827020613.GA10048@bubble.grove.modra.org> <CAH8yC8=eXpB67LsZY9HjZx5yXhBUVoE6iGDhRTpGgjcu64d80A@mail.gmail.com> <alpine.LSU.2.21.1808271431470.7867@wotan.suse.de>
- Reply-to: noloader at gmail dot com
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