nm(1)nm(1)Namenm - print program's name list
Syntaxnm [options] [file...]
Description
The command 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 is produced. If no file is given, the file
is used.
Each symbol name is preceded by its value, which is blank if undefined,
and a letter. The letter defines the symbol type:
U Undefined
A Absolute
T Text segment symbol
D Data segment symbol
B Bss segment symbol
C Common symbol
f File name
- For symbol table entries (see -a option below).
If the symbol is local (non-external), the letter is in lower case.
The output is sorted alphabetically.
Options-a Displays all symbols including debug symbol table.
-e Prints only global (external) symbols.
-f Displays all symbols including debug symbol table.
-g Prints only global (external) symbols.
-n Sorts numerically rather than alphabetically.
-o Prepends file or archive element name to each output line.
-p Prints symbolic table order and does not sort.
-r Sorts in reverse order.
-u Displays only undefined symbols.
Diagnostics
bad format Indicates that the file is neither an archive file
nor a .o file.
cannot open Indicates that the file could not be opened.
invalid argument Indicates that an invalid option was specified.
no name list Indicates that the file does not contain a symbol
table.
ran out of memory Indicates that the string table in either the ar‐
chive or .o file is too big.
See Alsoar(1), ar(5), a.out(5), stab(5)
VAX nm(1)