This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: strip --strip-unneeded?
Date: Fri, 12 May 2000 15:39:11 -0700
From: "H . J . Lu" <hjl@lucon.org>
It is unclear to me what "strip --strip-unneeded" should do on .o
files. To me, it should keep global symbols as well as symbols which
need relocation processing. Global symbols defined in the .o file may
be needed for relocation processing for other files. Currently
"strip --strip-unneeded" will remove global symbols which aren't
involved in relocation.
Ian, any ideas?
I think I agree. strip --strip-unneeded is meaningful on a
relocateable file. It should remove only BSF_LOCAL symbols which are
not referenced by any relocations.
A relocateable file is one with HAS_RELOC set, and neither EXEC_P nor
DYNAMIC set. However, I don't know whether are all BFD backends are
fully reliable about setting EXEC_P and DYNAMIC.
Ian