added support for the original "make chech-cdtest"
[deliverable/binutils-gdb.git] / binutils / nm.1
CommitLineData
503b9350
RP
1.\" Copyright (c) 1991 Free Software Foundation
2.\" See section COPYING for conditions for redistribution
503b9350
RP
3.TH nm 1 "5 November 1991" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
11nm\(em\&list symbols from object files.
12
13.SH SYNOPSIS
14.hy 0
15.na
16.TP
17.B nm
1f72cab1
DM
18.RB "[\|" \-a | \-\-debug\-syms "\|]"
19.RB "[\|" \-g | \-\-extern\-only "\|]"
20.RB "[\|" \-s | \-\-print\-armap "\|]"
21.RB "[\|" \-o | \-\-print\-file\-name "\|]"
22.RB "[\|" \-n | \-\-numeric\-sort "\|]"
23.RB "[\|" \-p | \-\-no\-sort "\|]"
24.RB "[\|" \-r | \-\-reverse\-sort "\|]"
25.RB "[\|" \-u | \-\-undefined\-only "\|]"
b26ac613
DM
26.RB "[\|" \-\-help "\|]"
27.RB "[\|" \-\-version "\|]"
28.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
29.RB "[\|" \-P | --portability "\|]"
30.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
31.RB "[\|" "\-\-target=\fIbfdname" "\|]"
503b9350 32.RB "[\|" \c
1f72cab1 33.I objfile\c
503b9350
RP
34\&.\|.\|.\|]
35.ad b
36.hy 1
37.SH DESCRIPTION
38GNU \c
39.B nm\c
b26ac613 40\& lists the symbols from object files \c
1f72cab1 41.I objfile\c
b26ac613
DM
42\&. If no object files are given as arguments, \c
43.B nm\c
44\& assumes `\|\c
45.B a.out\c
46\|'.
503b9350
RP
47
48.SH OPTIONS
49The long and short forms of options, shown here as alternatives, are
50equivalent.
51
52.TP
b26ac613
DM
53.B \-A
54.TP
55.B \-o
56.TP
57.B \-\-print\-file\-name
58Precede each symbol by the name of the input file where it was found,
59rather than identifying the input file once only before all of its
60symbols.
503b9350
RP
61
62.TP
63.B \-a
64.TP
1f72cab1 65.B \-\-debug\-syms
503b9350
RP
66Display debugger-only symbols; normally these are not listed.
67
68dd5295
DM
68.TP
69.B \-B
70The same as
71.B \-\-format=bsd
72(for compatibility with the MIPS \fBnm\fP).
73
b26ac613
DM
74.TP
75.B "\-f \fIformat"
76Use the output format \fIformat\fP, which can be ``bsd'',
77``sysv'', or ``posix''. The default is `bsd''.
78Only the first character of \fIformat\fP is significant; it can be
79either upper or lower case.
80
503b9350
RP
81.TP
82.B \-g
83.TP
1f72cab1 84.B \-\-extern\-only
503b9350
RP
85Display only external symbols.
86
b26ac613
DM
87.TP
88.B \-n
89.TP
90.B \-v
91.TP
92.B \-\-numeric\-sort
93Sort symbols numerically by their addresses, not alphabetically by their
94names.
95
503b9350
RP
96.TP
97.B \-p
98.TP
1f72cab1 99.B \-\-no\-sort
503b9350
RP
100Don't bother to sort the symbols in any order; just print them in the
101order encountered.
102
103.TP
b26ac613 104.B \-P
503b9350 105.TP
b26ac613
DM
106.B \-\-portability
107Use the POSIX.2 standard output format instead of the default format.
108Equivalent to ``\-f posix''.
503b9350
RP
109
110.TP
111.B \-s
112.TP
1f72cab1 113.B \-\-print\-armap
503b9350
RP
114When listing symbols from archive members, include the index: a mapping
115(stored in the archive by \c
116.B ar\c
117\& or \c
118.B ranlib\c
119\&) of what modules
120contain definitions for what names.
121
503b9350
RP
122.TP
123.B \-r
124.TP
1f72cab1 125.B \-\-reverse\-sort
503b9350
RP
126Reverse the sense of the sort (whether numeric or alphabetic); let the
127last come first.
128
129.TP
b26ac613
DM
130.B "\-t \fIradix"
131.TP
132.B "\-\-radix=\fIradix"
133Use \fIradix\fP as the radix for printing the symbol values. It must be
134``d'' for decimal, ``o'' for octal, or ``x'' for hexadecimal.
135
136.TP
137.BI "\-\-target=" "bfdname"\c
503b9350
RP
138\&
139Specify an object code format other than your system's default format.
140See
141.BR objdump ( 1 ),
142for information on listing available formats.
143
144.TP
145.B \-u
146.TP
1f72cab1 147.B \-\-undefined\-only
503b9350
RP
148Display only undefined symbols (those external to each object file).
149
b26ac613
DM
150.TP
151.B \-V
152.TP
153.B \-\-version
154Show the version number of
155.B nm
156and exit.
157
158.TP
159.B \-\-help
160Show a summary of the options to
161.B nm
162and exit.
503b9350
RP
163
164.SH "SEE ALSO"
165.RB "`\|" binutils "\|'"
166entry in
167.B
168info\c
169\&;
170.I
171The GNU Binary Utilities\c
172\&, Roland H. Pesch (October 1991);
173.BR ar "(" 1 "),"
174.BR objdump ( 1 ),
175.BR ranlib "(" 1 ")."
176
177
178.SH COPYING
179Copyright (c) 1991 Free Software Foundation, Inc.
180.PP
181Permission is granted to make and distribute verbatim copies of
182this manual provided the copyright notice and this permission notice
183are preserved on all copies.
184.PP
185Permission is granted to copy and distribute modified versions of this
186manual under the conditions for verbatim copying, provided that the
187entire resulting derived work is distributed under the terms of a
188permission notice identical to this one.
189.PP
190Permission is granted to copy and distribute translations of this
191manual into another language, under the above conditions for modified
192versions, except that this permission notice may be included in
193translations approved by the Free Software Foundation instead of in
194the original English.
This page took 0.074492 seconds and 4 git commands to generate.