Linux command
nm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List symbols
nm [binary]
Show only external symbols
nm -g [binary]
Show undefined symbols
nm -u [binary]
Show defined symbols
nm -U [binary]
Demangle C++ symbols
nm -C [binary]
Sort by address
nm -n [binary]
Show symbol sizes
nm -S [binary]
说明
nm lists symbols from object files. Shows function and variable names. The tool inspects binaries. Essential for debugging and reverse engineering.
参数
- -g
- External symbols only.
- -u
- Undefined symbols only.
- -U
- Defined symbols only.
- -C
- Demangle C++ names.
- -n
- Sort by address.
- -S
- Print symbol sizes.
- --help
- Display help information.
FAQ
What is the nm command used for?
nm lists symbols from object files. Shows function and variable names. The tool inspects binaries. Essential for debugging and reverse engineering.
How do I run a basic nm example?
Run `nm [binary]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g do in nm?
External symbols only.