How to view symbols in object files?

前端 未结 5 1117
旧时难觅i
旧时难觅i 2021-01-30 03:55

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

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 04:36

    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.

提交回复
热议问题