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]

Re: strip/objcopy will not remove dynamic symbols


On Tue, Jun 22, 2004 at 06:23:09PM -0700, William Croft wrote:
> 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.

If you don't want them in the dynamic symbol table, you should make
them internal to foo.so. You can do it with symbol visibility or
linker script.


H.J.


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