Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view symbols in object files?

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

like image 338
nakiya Avatar asked Oct 07 '10 10:10

nakiya


People also ask

What are symbols in object files?

What exactly are these? Object files are almost full executables. They contain machine code, but that code still requires a relocation step. It also contains metadata about the addresses of its variables and functions (called symbols) in an associative data structure called a symbol table.

How do I view OBJ files?

Need to view 3D files online? Just install the software OBJ Viewer To begin viewing 3D files, simply do the following Install the extension OBJ Viewer Click on the extension icon Choose the 3D file you wish to open Begin viewing your 3D files online today! This 3D viewer works for both STL and OBJ file formats.


1 Answers

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.

like image 51
DarkDust Avatar answered Sep 20 '22 13:09

DarkDust