130 lines
2.3 KiB
Groff
130 lines
2.3 KiB
Groff
.\" @(#)nm.1 1.1 94/10/31 SMI; from UCB 4.1
|
|
.TH NM 1 "7 September 1989"
|
|
.SH NAME
|
|
nm \- print symbol name list
|
|
.SH SYNOPSIS
|
|
.B nm
|
|
[
|
|
.B \-gnoprsua
|
|
]
|
|
[
|
|
.RI [ " filename " "] .\|.\|."
|
|
.SH DESCRIPTION
|
|
.IX "nm command" "" "\fLnm\fP \(em display name list"
|
|
.IX display "name list of object file or library \(em \fLnm\fP"
|
|
.IX "programming tools" nm "" "\fLnm\fP \(em display name list"
|
|
.B nm
|
|
prints the name list (symbol table) of each object
|
|
.I filename
|
|
in the argument list.
|
|
If an argument is
|
|
an archive, a listing for each object
|
|
file in the archive will be produced.
|
|
If no
|
|
.I filename
|
|
is given, the symbols in
|
|
.B a.out
|
|
are listed.
|
|
.SS Output Format
|
|
.LP
|
|
Each symbol name is preceded by its value (blanks if undefined)
|
|
and one of the letters:
|
|
.TP
|
|
.B A
|
|
absolute
|
|
.TP
|
|
.B B
|
|
bss segment symbol
|
|
.TP
|
|
.B C
|
|
common symbol
|
|
.TP
|
|
.B D
|
|
data segment symbol
|
|
.TP
|
|
.B f
|
|
filename
|
|
.TP
|
|
.B t
|
|
a static function symbol
|
|
.TP
|
|
.B T
|
|
text segment symbol
|
|
.TP
|
|
.B U
|
|
undefined
|
|
.TP
|
|
.B \-
|
|
debug, giving symbol table entries (see
|
|
.B \-a
|
|
below)
|
|
.LP
|
|
The type letter is upper case if the symbol is external, and
|
|
lower case if it is local. The output is sorted alphabetically.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-a
|
|
Print all symbols.
|
|
.TP
|
|
.B \-g
|
|
Print only global (external) symbols.
|
|
.TP
|
|
.B \-n
|
|
Sort numerically rather than alphabetically.
|
|
.TP
|
|
.B \-o
|
|
Prepend file or archive element name to
|
|
each output line rather than only once.
|
|
.TP
|
|
.B \-p
|
|
Do not sort; print in symbol-table order.
|
|
.TP
|
|
.B \-r
|
|
Sort in reverse order.
|
|
.TP
|
|
.B \-s
|
|
Sort according to the size of the external
|
|
symbol (computed from the difference between the
|
|
value of the symbol and the value of the symbol
|
|
with the next higher value).
|
|
This difference is the value printed.
|
|
.TP
|
|
.B \-u
|
|
Print only undefined symbols.
|
|
.SH EXAMPLE
|
|
.IP
|
|
.B example% nm
|
|
.LP
|
|
prints the symbol list of the file named
|
|
.BR a.out ,
|
|
the default output file for the
|
|
.BR C ,
|
|
compiler.
|
|
.SH SEE ALSO
|
|
.BR ar (1V),
|
|
.BR as (1),
|
|
.BR cc (1V),
|
|
.BR ld (1),
|
|
.BR tmpnam (3S),
|
|
.BR a.out (5),
|
|
.BR ar (5),
|
|
.BR coff (5)
|
|
.SH BUGS
|
|
.LP
|
|
To see what is in a shared library, run
|
|
.B nm
|
|
on the
|
|
.I static
|
|
.RB ( .a )
|
|
version.
|
|
.SH "Sun386i BUGS"
|
|
When all the symbols are printed, they must be printed in the order they
|
|
appear in the symbol table in order to preserve scoping information.
|
|
Therefore, the
|
|
.B \-v
|
|
and
|
|
.B \-n
|
|
options should be used only in conjunction with the
|
|
.B \-e
|
|
option.
|