c++ - read - view symbols in so file

How to view symbols in object files? (3)

How can I view symbols in a .o file? nm does not work for me. I use g++/linux.

Have you been using a cross-compiler for another platform? If so, you need to use the respective nm or objdump commmand.

For example, if you have used XXX-YYY-gcc to compile the .o file, you need to use XXX-YYY-nm or XXX-YYY-objdump to process the files.

Instead of nm, you can use the powerful objdump. See the man page for details. Try objdump -t myfile or objdump -T myfile. With the -C flag you can also demangle C++ names, like nm does.

There is a command to take a look at which functions are included in an object file or library or executable: