NM(C) XENIX System V NM(C)
Name
nm - Prints name list.
Syntax
nm [ -acgnoOprsSuv ] [ +offset ] [ 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. nm works transparently on COFF files and XENIX
generated object files. nm translates all possible COFF
symbols into standard XENIX object symbols.
If no file is given, the symbols in a.out are listed.
Each symbol name is preceded by its value in hexadecimal
(blanks if undefined) and one of the letters U (undefined),
A (absolute), T (text segment symbol), D (data segment
symbol), B (bss segment symbol), S (segment name), C (common
symbol), K (8086 common segment), or S (segment name). If
the symbol table is in segmented format, symbol values are
displayed as segment:offset. If the symbol is local (non-
external), the type letter is in lowercase. The output is
sorted alphabetically.
Options are:
-a Attempt to print the namelist of all modules in an
archive library. Normally, nm silently ignores any
library members which are not valid object modules.
Using this option causes nm to report an error for all
such modules. Note that the first member in any library
which has been processed by ranlib(C) is called
__ __.SYMDEF and is not a valid object module, thus the
-a option will always produce at least one error
message when used on such a library.
-c Print only C program symbols (symbols which begin with
`_') as they appeared in the C program.
-g Print only global (external) symbols.
-n Sort numerically rather than alphabetically.
-o Prepend file or archive element name to each output
line rather than only once.
-O Print symbol values in octal.
-p Don't sort; print in symbol-table order.
Page 1 (printed 2/7/91)
NM(C) XENIX System V NM(C)-r Sort in reverse order.
-s Sort by size of symbol and display each symbol's size
instead of value. The last symbol in each text or data
segment may be assigned a size of 0. This implies the
-n option.
-S Switch the display format. If the symbol table is in
segmented format, print values in non-segmented format.
If not segmented, print values in segmented format.
Segment offsets in 386 object modules and executable
files are 32 bits rather than 16 bits.
-u Print only undefined symbols.
-v Also describe the object file and symbol table format.
Files
a.out
See Also
ar(C), ar(F), a.out(F)
Page 2 (printed 2/7/91)