This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold: Something special about malloc/calloc/realloc/free symbols?
On Thu, 2017-01-12 at 11:29 -0800, Cary Coutant wrote:
> No, there's nothing different between using
> __attribute__((visibility("default"))) vs. -fvisibility=default.
> There's something else going on. It may have to do with versions; in
> libc, these symbols are typically marked with a version (e.g.,
> "GLIBC_2.2.5"). Try using the linker's -y option to find all
> references and definitions of these symbols, then use readelf -s to
> see the symbol names with versions.
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.
Cheers!