- 显示所有符号:
nm -C execute_file
- 查找是否存在目标符号
nm -C execute_file | grep target_symbol
- nm命令除了对可执行文件使用,还可以对符号文件和静态库使用。
- 可以用nm命令查找全局变量符号, 从而hack某些secret。
- 查找目标符号具体在哪个静态库
nm -AC ./*.a | grep target_symbol
nm -C execute_file
nm -C execute_file | grep target_symbol
nm -AC ./*.a | grep target_symbol