This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Hiding symbols in a static library
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.
> 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).
Ah, a solution at last. Here's what I'm doing:
ld -r --whole-archive libABC.a -o libABC_temp.o
objcopy --keep-global-symbols=Symbols.static libABC_temp.o libABC.o
ar cru libABC.a libABC.o
Thanks to all that helped.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/