Hiding symbols in a static library

Ken Raeburn raeburn@raeburn.org
Wed Sep 30 01:17:00 GMT 2009


On Sep 28, 2009, at 13:45, Ian Lance Taylor wrote:
> It may be that --retain-symbols-file keeps symbol which have
> relocations and does not convert them to local.  I haven't checked.

I took a quick look at bfd/elflink.c, and my impression is that that's  
the case.
Arguably that may be a bug, or at least a missing feature.

> You may need to follow it with a call to objcopy --localize-symbols.
> Or just skip --retain-symbols-file, --localize-symbols should do the
> job (on a single object file produced by ld -r --whole-archive).

Yes, that ought to work...

Ken



More information about the Binutils mailing list