strip vs. nm vs. readelf

Erik Leunissen e.leunissen@hccnet.nl
Wed Dec 14 21:24:00 GMT 2005


L.S.

I stumble across some apparent contradictory behaviour of the 
applications strip, nm and readelf.

This occurs when processing a shared lib "myLib.so" which has been 
subjected to the strip application as follows:

     strip --strip-unneeded myLib.so


Next, when I invoke:

     nm -a myLib.so

the output is (as expected):

     nm: myLib.so: no symbols



Finally, when doing:

     readelf -a myLib.so

a lot of information is emitted, including the names of symbols that I 
believed to be removed by strip.

Probably there is some misunderstanding on my part about what exactly it 
is that strip removes, what nm emits and/or what readelf emits.

Does anybody see what I fail to understand?

Thanks in advance,

Erik Leunissen
==============



More information about the Binutils mailing list