nm - display name list (symbol table)
nm [-aCegnoprsuVw] [file ...]
The symbol table (name list) of each object in file(s) is
a library (archive) is given, nm displays a list for each
member. If file is not present, nm searches for the file
a.out and displays
its symbol table if it exists.
The options are as follows:
-a Display symbol table entries inserted for use by debuggers.
-C Decode low-level symbol names. This involves removing extra underscores
and making C++ function names readable.
-e Output extended information, that is `w' for weak
for function-like symbols, and `o' for object-like
-g Restrict display to external (global) symbols.
-n Present results in numerical order.
-o Display full path or library name of object on every
-p Do not sort at all.
-r Reverse order sort.
-s Show archive index.
-u Display undefined symbols only.
-V Show program version.
-w Warn about non-object archive members. Normally, nm
ignore all archive members which are not object
Each symbol name is preceded by its value (a blank field if
the symbol is
undefined) and one of the following letters:
- debugger symbol table entries (see the -a option)
B bss segment symbol
C common symbol
D data segment symbol
I indirect reference (alias to other symbol)
F file name
T text segment symbol
W weak symbol (only on ELF binaries)
If the symbol is local (non-external), the type letter is in
The output is sorted alphabetically.
ar(1), a.out(5), ar(5), elf(5), stab(5)
An nm command appeared in Version 6 AT&T UNIX.
OpenBSD 3.6 June 6, 1993
[ Back ]