nm 用法與範例

本篇 ShengYu 介紹 Linux nm 用法與範例。

nm 顯示符號表 symbols

這邊示範 nm 顯示符號表 symbols,

1
nm -gC <executable binary|library>

-g
–extern-only
僅顯示外部符號。
Display only external symbols.

-C
–demangle[=style]
將低階符號名稱解碼成用戶級名稱,除了去掉所開頭的下劃線之外,還使得C++函式名稱以可理解的方式顯示出來。
Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes C++ function names readable. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler.

以上就是 nm 用法與範例的介紹,
如果你覺得我的文章寫得不錯、對你有幫助的話記得 Facebook 按讚支持一下!

參考
nm命令_Linux nm 命令用法详解:显示二进制目标文件的符号表
https://man.linuxde.net/nm

其它相關文章推薦
Linux 常用指令教學懶人包
objdump 用法與範例
readelf 用法與範例