NM(1) — Unix Programmer’s Manual
NAME
nm − print name list
SYNOPSIS
nm [ options ] [ file ... ]
DESCRIPTION
Nm prints the name list (symbol table) of each object file in the argument list. If an argument is an archive, a listing for each object file in the archive will be produced. If no file is given, the symbols in a.out are listed.
Each symbol name is preceded by its value (blanks if undefined) and one of the following letters:
− Debugger symbol table entries (see −a below).
A Absolute
B Bss segment symbol
C Common symbol
D Data segment symbol
f filename
T Text segment symbol
U Undefined
If the symbol is local (non-external), the type letter appears in lower case. Nm sorts the output alphabetically.
OPTIONS
−a Prints symbol table entries inserted for use by debuggers.
−g Prints only global (external) symbols.
−n Sorts numerically rather than alphabetically.
−o Prepends file or archive element name to each output line rather than only once.
−p Cancels the sorting operation. Prints in symbol-table order.
−r Sorts in reverse order.
−u Prints only undefined symbols.
SEE ALSO
ar(1), ar(5), a.out(5), stab(5)
4th Berkeley Distribution — April 29, 1985