NM(1) — Unix Programmer’s Manual
NAME
nm − print symbol table
SYNOPSIS
nm [ options ] [ files ]
DESCRIPTION
Nm prints the symbol table (name list) 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:
A Absolute.
B Bss segment symbol.
C Common symbol.
D Data segment symbol.
f File name.
T Text segment symbol.
U Undefined.
− Sdb symbol table entries (see −a below).
If the symbol is local (non-external) the type letter is in lower case. The output is sorted alphabetically.
OPTIONS
−a Prints all symbols.
−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 Does not sort; 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 — 1 August 1985