Linux common commands-67: nm

The nm command is mainly used to list symbols in certain files, that is, some functions and global variables, which are often used in code debugging.

Syntax format: nm [parameters]

Common parameters:

Example

 # 显示目标文件test.o中的未定义符号,需要和其他对象文件进行链接nm -u test.o # 在/usr/lib/ 目录下找出哪个库文件定义了memset函数nm -A /usr/lib/* 2>/dev/null | grep "T memset"

This article is reprinted from https://xugaoxiang.com/2022/06/22/linux-cmds-67-nm/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment