Hi, How can I view symbols in a .o file? nm does not work for me. I use g++/linux.
+1
A:
There is a command to take a look at which functions are included in an object file or library or executable:
nm
Als
2010-10-07 10:58:06
+1
A:
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.
DarkDust
2010-10-07 11:05:25
I tried ObjDump also. Same result : `objdump: Lib1.o: File format not recognized`
nakiya
2010-10-07 11:07:11
A:
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.
Schedler
2010-10-07 11:35:06