This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
strip/objcopy will not remove dynamic symbols
- From: William Croft <croft at mitem dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 22 Jun 2004 18:23:09 -0700
- Subject: strip/objcopy will not remove dynamic symbols
- Organization: MITEM Corp.
When I use the "-N symbolname" option of strip or objcopy, the symbol IS removed from the "normal" symbol table (as shown by "nm -a"). But the symbol is NOT removed from the dynamic table ("nm -D").
Can anyone suggest a workaround that will allow me to remove a dynamic symbol? Or hint at what might be the area to look at in the source? I'm currently running binutils 2.13.90.0.18 from Redhat Linux 9, but could build my own patched version of strip.
The symbols I'm trying to remove are in our product shared library (say "foo.so") that does some license file checks via calling functions internal to foo.so. But the license functions were pulled in from a "bar.a" library used in linking foo.so. Hence the license functions in foo.so are marked in the nm output as 'T' (internally defined global text symbols). But they are not called from outside foo.so, so they can be safely deleted from all symbol tables.
I already tried other options that I thought might help: --strip-unneeded and -L symbolname (localize symbol). That didnt work either.
Thanks for your ideas.
--Bill Croft