You can use the file command to see if the file is stripped . This basically means that there are debugging symbols there or not.
Here is one file from my system:
$ file libjsd.so libjsd.so: ELF 32-bit LSB shared object, \ Intel 80386, version 1 (SYSV), dynamically linked, stripped
Pay attention to the separation.
Here's something I compiled:
$ file libprofile_rt.so libprofile_rt.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x..., not stripped
see the "no strip" section, which indicates that it has debugging symbols.
You can also separate debugging symbols from the most common object using objcopy . This will extract the characters in another file, and then you will need to find out the link in order to return them. You can see instructions for doing this with gdb using build-ids. This is useful if you want to deliver something without characters, but then you can debug it as a last resort from a dump.
source share