This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

strip/objcopy will not remove dynamic symbols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]