How to view characters in object files?

How to view characters in a .o file? nm doesn't work for me. I am using g ++ / linux.

+44
c ++ linux g ++ object-files
07 Oct 2018-10-10 at
source share
4 answers

Instead of nm you can use powerful objdump . See the man page. Try objdump -t myfile or objdump -t myfile . With the -C flag, you can also expand C ++ names, such as nm .

+52
Oct 07 '10 at 11:05
source share

Are you using cross compiler for another platform? If so, you need to use the appropriate nm or objdump commands.

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

+8
Oct 07 '10 at 11:35
source share

There is a command to see what functions are included in an object file or library or executable file:

 nm 
+7
Oct 07 '10 at
source share

Just run: nm you_obj_file.o | c++filt nm you_obj_file.o | c++filt

+3
Dec 30 '16 at 2:20
source share



All Articles