1991-11-05 23:29:15 +01:00
|
|
|
.\" Copyright (c) 1991 Free Software Foundation
|
|
|
|
.\" See section COPYING for conditions for redistribution
|
|
|
|
.TH nm 1 "5 November 1991" "cygnus support" "GNU Development Tools"
|
|
|
|
.de BP
|
|
|
|
.sp
|
|
|
|
.ti \-.2i
|
|
|
|
\(**
|
|
|
|
..
|
|
|
|
|
|
|
|
.SH NAME
|
1993-11-13 16:16:23 +01:00
|
|
|
nm \- list symbols from object files.
|
1991-11-05 23:29:15 +01:00
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.hy 0
|
|
|
|
.na
|
|
|
|
.TP
|
|
|
|
.B nm
|
1993-04-29 20:15:00 +02:00
|
|
|
.RB "[\|" \-a | \-\-debug\-syms "\|]"
|
|
|
|
.RB "[\|" \-g | \-\-extern\-only "\|]"
|
1993-08-13 02:02:25 +02:00
|
|
|
.RB "[\|" \-B "\|]"
|
|
|
|
.RB "[\|" \-C | \-\-demangle "\|]"
|
1994-04-07 04:04:34 +02:00
|
|
|
.RB "[\|" \-D | \-\-dynamic "\|]"
|
1993-04-29 20:15:00 +02:00
|
|
|
.RB "[\|" \-s | \-\-print\-armap "\|]"
|
|
|
|
.RB "[\|" \-o | \-\-print\-file\-name "\|]"
|
|
|
|
.RB "[\|" \-n | \-\-numeric\-sort "\|]"
|
|
|
|
.RB "[\|" \-p | \-\-no\-sort "\|]"
|
|
|
|
.RB "[\|" \-r | \-\-reverse\-sort "\|]"
|
1994-09-14 18:28:41 +02:00
|
|
|
.RB "[\|" \-\-size\-sort "\|]"
|
1993-04-29 20:15:00 +02:00
|
|
|
.RB "[\|" \-u | \-\-undefined\-only "\|]"
|
1996-06-12 20:59:47 +02:00
|
|
|
.RB "[\|" \-l | \-\-line\-numbers "\|]"
|
1993-06-28 04:17:13 +02:00
|
|
|
.RB "[\|" \-\-help "\|]"
|
|
|
|
.RB "[\|" \-\-version "\|]"
|
|
|
|
.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
|
|
|
|
.RB "[\|" \-P | --portability "\|]"
|
|
|
|
.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
|
|
|
|
.RB "[\|" "\-\-target=\fIbfdname" "\|]"
|
1991-11-05 23:29:15 +01:00
|
|
|
.RB "[\|" \c
|
1993-04-29 20:15:00 +02:00
|
|
|
.I objfile\c
|
1991-11-05 23:29:15 +01:00
|
|
|
\&.\|.\|.\|]
|
|
|
|
.ad b
|
|
|
|
.hy 1
|
|
|
|
.SH DESCRIPTION
|
|
|
|
GNU \c
|
|
|
|
.B nm\c
|
1993-06-28 04:17:13 +02:00
|
|
|
\& lists the symbols from object files \c
|
1993-04-29 20:15:00 +02:00
|
|
|
.I objfile\c
|
1993-06-28 04:17:13 +02:00
|
|
|
\&. If no object files are given as arguments, \c
|
|
|
|
.B nm\c
|
|
|
|
\& assumes `\|\c
|
|
|
|
.B a.out\c
|
|
|
|
\|'.
|
1991-11-05 23:29:15 +01:00
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
The long and short forms of options, shown here as alternatives, are
|
|
|
|
equivalent.
|
|
|
|
|
|
|
|
.TP
|
1993-06-28 04:17:13 +02:00
|
|
|
.B \-A
|
|
|
|
.TP
|
|
|
|
.B \-o
|
|
|
|
.TP
|
|
|
|
.B \-\-print\-file\-name
|
|
|
|
Precede each symbol by the name of the input file where it was found,
|
|
|
|
rather than identifying the input file once only before all of its
|
|
|
|
symbols.
|
1991-11-05 23:29:15 +01:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.B \-a
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-debug\-syms
|
1991-11-05 23:29:15 +01:00
|
|
|
Display debugger-only symbols; normally these are not listed.
|
|
|
|
|
1993-08-02 20:41:14 +02:00
|
|
|
.TP
|
|
|
|
.B \-B
|
|
|
|
The same as
|
|
|
|
.B \-\-format=bsd
|
|
|
|
(for compatibility with the MIPS \fBnm\fP).
|
|
|
|
|
1993-08-13 02:02:25 +02:00
|
|
|
.TP
|
|
|
|
.B \-C
|
|
|
|
.TP
|
|
|
|
.B \-\-demangle
|
|
|
|
Decode (\fIdemangle\fP) low-level symbol names into user-level names.
|
|
|
|
Besides removing any initial underscore prepended by the system, this
|
|
|
|
makes C++ function names readable.
|
|
|
|
|
1994-04-07 04:04:34 +02:00
|
|
|
.TP
|
|
|
|
.B \-D
|
|
|
|
.TP
|
|
|
|
.B \-\-dynamic
|
|
|
|
Display the dynamic symbols rather than the normal symbols. This is
|
|
|
|
only meaningful for dynamic objects, such as certain types of shared
|
|
|
|
libraries.
|
|
|
|
|
1993-06-28 04:17:13 +02:00
|
|
|
.TP
|
|
|
|
.B "\-f \fIformat"
|
|
|
|
Use the output format \fIformat\fP, which can be ``bsd'',
|
1995-10-06 21:48:58 +01:00
|
|
|
``sysv'', or ``posix''. The default is ``bsd''.
|
1993-06-28 04:17:13 +02:00
|
|
|
Only the first character of \fIformat\fP is significant; it can be
|
|
|
|
either upper or lower case.
|
|
|
|
|
1991-11-05 23:29:15 +01:00
|
|
|
.TP
|
|
|
|
.B \-g
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-extern\-only
|
1991-11-05 23:29:15 +01:00
|
|
|
Display only external symbols.
|
|
|
|
|
1993-06-28 04:17:13 +02:00
|
|
|
.TP
|
|
|
|
.B \-n
|
|
|
|
.TP
|
|
|
|
.B \-v
|
|
|
|
.TP
|
|
|
|
.B \-\-numeric\-sort
|
|
|
|
Sort symbols numerically by their addresses, not alphabetically by their
|
|
|
|
names.
|
|
|
|
|
1991-11-05 23:29:15 +01:00
|
|
|
.TP
|
|
|
|
.B \-p
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-no\-sort
|
1991-11-05 23:29:15 +01:00
|
|
|
Don't bother to sort the symbols in any order; just print them in the
|
|
|
|
order encountered.
|
|
|
|
|
|
|
|
.TP
|
1993-06-28 04:17:13 +02:00
|
|
|
.B \-P
|
1991-11-05 23:29:15 +01:00
|
|
|
.TP
|
1993-06-28 04:17:13 +02:00
|
|
|
.B \-\-portability
|
|
|
|
Use the POSIX.2 standard output format instead of the default format.
|
|
|
|
Equivalent to ``\-f posix''.
|
1991-11-05 23:29:15 +01:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.B \-s
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-print\-armap
|
1991-11-05 23:29:15 +01:00
|
|
|
When listing symbols from archive members, include the index: a mapping
|
|
|
|
(stored in the archive by \c
|
|
|
|
.B ar\c
|
|
|
|
\& or \c
|
|
|
|
.B ranlib\c
|
|
|
|
\&) of what modules
|
|
|
|
contain definitions for what names.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B \-r
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-reverse\-sort
|
1991-11-05 23:29:15 +01:00
|
|
|
Reverse the sense of the sort (whether numeric or alphabetic); let the
|
|
|
|
last come first.
|
|
|
|
|
1994-09-14 18:28:41 +02:00
|
|
|
.TP
|
|
|
|
.B \-\-size\-sort
|
|
|
|
Sort symbols by size. The size is computed as the difference between
|
|
|
|
the value of the symbol and the value of the symbol with the next higher
|
|
|
|
value. The size of the symbol is printed, rather than the value.
|
|
|
|
|
1991-11-05 23:29:15 +01:00
|
|
|
.TP
|
1993-06-28 04:17:13 +02:00
|
|
|
.B "\-t \fIradix"
|
|
|
|
.TP
|
|
|
|
.B "\-\-radix=\fIradix"
|
|
|
|
Use \fIradix\fP as the radix for printing the symbol values. It must be
|
|
|
|
``d'' for decimal, ``o'' for octal, or ``x'' for hexadecimal.
|
|
|
|
|
|
|
|
.TP
|
1995-10-06 21:48:58 +01:00
|
|
|
.BI "\-\-target=" "bfdname"
|
1991-11-05 23:29:15 +01:00
|
|
|
Specify an object code format other than your system's default format.
|
|
|
|
See
|
|
|
|
.BR objdump ( 1 ),
|
|
|
|
for information on listing available formats.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B \-u
|
|
|
|
.TP
|
1993-04-29 20:15:00 +02:00
|
|
|
.B \-\-undefined\-only
|
1991-11-05 23:29:15 +01:00
|
|
|
Display only undefined symbols (those external to each object file).
|
|
|
|
|
1996-06-12 20:59:47 +02:00
|
|
|
.TP
|
|
|
|
.B \-l
|
|
|
|
.TP
|
|
|
|
.B \-\-line\-numbers
|
|
|
|
For each symbol, use debugging information to try to find a filename and
|
|
|
|
line number. For a defined symbol, look for the line number of the
|
|
|
|
address of the symbol. For an undefined symbol, look for the line
|
|
|
|
number of a relocation entry which refers to the symbol. If line number
|
|
|
|
information can be found, print it after the other symbol information.
|
|
|
|
|
1993-06-28 04:17:13 +02:00
|
|
|
.TP
|
|
|
|
.B \-V
|
|
|
|
.TP
|
|
|
|
.B \-\-version
|
|
|
|
Show the version number of
|
|
|
|
.B nm
|
|
|
|
and exit.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B \-\-help
|
|
|
|
Show a summary of the options to
|
|
|
|
.B nm
|
|
|
|
and exit.
|
1991-11-05 23:29:15 +01:00
|
|
|
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.RB "`\|" binutils "\|'"
|
|
|
|
entry in
|
|
|
|
.B
|
|
|
|
info\c
|
|
|
|
\&;
|
|
|
|
.I
|
|
|
|
The GNU Binary Utilities\c
|
|
|
|
\&, Roland H. Pesch (October 1991);
|
|
|
|
.BR ar "(" 1 "),"
|
|
|
|
.BR objdump ( 1 ),
|
|
|
|
.BR ranlib "(" 1 ")."
|
|
|
|
|
|
|
|
|
|
|
|
.SH COPYING
|
|
|
|
Copyright (c) 1991 Free Software Foundation, Inc.
|
|
|
|
.PP
|
|
|
|
Permission is granted to make and distribute verbatim copies of
|
|
|
|
this manual provided the copyright notice and this permission notice
|
|
|
|
are preserved on all copies.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute modified versions of this
|
|
|
|
manual under the conditions for verbatim copying, provided that the
|
|
|
|
entire resulting derived work is distributed under the terms of a
|
|
|
|
permission notice identical to this one.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute translations of this
|
|
|
|
manual into another language, under the above conditions for modified
|
|
|
|
versions, except that this permission notice may be included in
|
|
|
|
translations approved by the Free Software Foundation instead of in
|
|
|
|
the original English.
|