I have a shared library with the symbols stripped. Using a known method/tool to get the symbol names (like nm -D, objdump, readelf, etc) I see that all the symbols are actually hidden.
However, if I run the strings linux tool on my shared library, I can see some of those symbols exposed. I made sure I don't print any of those symbols in messages, but it still somehow prints the symbols that I expect to be stripped.
So, my question is, how can I hide my symbols even from the strings command line tool in linux? Any help would be appreciated.
EDIT:
I am using strip -strip--all to hide the static symbols and I also enable the -fvisibility=hidden compile flag to hide the unneeded dynamic symbols.
Taken from
man strings:The difference between
stringsand the tools mentioned by you (readelf,objdump, etc) is that those rely mostly on the DWARF information embedded in the ELF object, whereas thestringsutility outputs ANY printable sequence from the binary data (DWARF unrelated).How can I hide my symbols even from the
stringsutility: this could be of help.