This is the mail archive of the
mailing list for the binutils project.
Re: gold: Something special about malloc/calloc/realloc/free symbols?
On Mon, 2017-01-23 at 16:54 -0800, Cary Coutant wrote:
> > I discovered that __attribute__((visibility("default"))) was being set
> > on the malloc symbols; I found a way to disable that and if I do that
> > and then compile with -fvisibility=hidden, then I can verify that those
> > symbols are not exported in my .so.
> So, just to clarify, is gold working as you expect now?
I have the behavior I want, yes.
I'm still not sure what the expected precedence is between attributes in
the source code vs. linker scripts: it appears, at least for these
symbols, that the __attribute__((visibility())) has a higher precedence
than instructions in the linker script, which I find odd, but maybe
that's just how it's intended to work. I couldn't find any information
on this in the documentation, and I got sidetracked before I could do a