How do I list the symbols being exported from a .so file? If possible, I’d also like to know their source (e.g. if they are pulled in from a static library).
I’m using gcc 4.0.2, if that makes a difference.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The standard tool for listing symbols is
nm, you can use it simply like this:If you want to see symbols of a C++ library, add the ‘-C’ option which demangle the symbols (it’s far more readable demangled).
If your .so file is in elf format, you have two options:
Either
objdump(-Cis also useful for demangling C++):Or use
readelf: