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