Hiding symbols in a static library

Erik de Castro Lopo mle+tools@mega-nerd.com
Mon Sep 28 11:04:00 GMT 2009


Ken Raeburn wrote:

> Right, there's nothing to cause any of the objects to get pulled in  
> from the archive libraries; "--retain-symbols-file" is just about  
> trimming the symbol table.  Add "-u symbol" options for specific  
> symbols, or "--whole-archive" to just suck in everything.

Thanks, --whole-archive helps.
 
> Hm, that ought to work, I think...  Check closely -- is it exporting  
> them as global symbols, or retaining them after converting to local  
> symbols so that they can still be used in relocations within the  
> output file?

I'm not sure, I've been  looking at the output of

   nm -g whatever.o

Is there a better way of figuring out what is being exported and what
isn't?

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Binutils mailing list