Finding out what C++ symbols are in a library.

November 23rd 2004 08:44 am

I was debugging a problem today that required me to find out what symbols were in a .so dynamic library. Being C++ symbols, the output from objdump wasn’t really very helpful. So in the interest of spreading my knowledge, I will now share the technique that worked for me with you guys:

Use this to dump the symbol table of a library:
objdump -t /path/to/lib | perl -e ‘while() { ($text) = m/(\w+)$/; print “$text\n”; }’ | c++filt

Use this to dump the dynamic symbol table of a library:
objdump -T /path/to/lib | perl -e ‘while() { ($text) = m/(\w+)$/; print “$text\n”; }’ | c++filt

Posted by mpyne under Uncategorized |

Trackback URI | Comments RSS

Leave a Reply


For spam filtering purposes, please copy the number 1684 to the field below This message appears because you have JavaScript disabled or your browser does not support CSS, a standard web feature.