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