* Makefile.in: Revert 2001-06-17.
[deliverable/binutils-gdb.git] / binutils / nm.1
1 .\" Automatically generated by Pod::Man version 1.02
2 .\" Wed May 30 12:24:27 2001
3 .\"
4 .\" Standard preamble:
5 .\" ======================================================================
6 .de Sh \" Subsection heading
7 .br
8 .if t .Sp
9 .ne 5
10 .PP
11 \fB\\$1\fR
12 .PP
13 ..
14 .de Sp \" Vertical space (when we can't use .PP)
15 .if t .sp .5v
16 .if n .sp
17 ..
18 .de Ip \" List item
19 .br
20 .ie \\n(.$>=3 .ne \\$3
21 .el .ne 3
22 .IP "\\$1" \\$2
23 ..
24 .de Vb \" Begin verbatim text
25 .ft CW
26 .nf
27 .ne \\$1
28 ..
29 .de Ve \" End verbatim text
30 .ft R
31
32 .fi
33 ..
34 .\" Set up some character translations and predefined strings. \*(-- will
35 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
36 .\" double quote, and \*(R" will give a right double quote. | will give a
37 .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
38 .\" to do unbreakable dashes and therefore won't be available. \*(C` and
39 .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
40 .tr \(*W-|\(bv\*(Tr
41 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
42 .ie n \{\
43 . ds -- \(*W-
44 . ds PI pi
45 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
46 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
47 . ds L" ""
48 . ds R" ""
49 . ds C` `
50 . ds C' '
51 'br\}
52 .el\{\
53 . ds -- \|\(em\|
54 . ds PI \(*p
55 . ds L" ``
56 . ds R" ''
57 'br\}
58 .\"
59 .\" If the F register is turned on, we'll generate index entries on stderr
60 .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
61 .\" index entries marked with X<> in POD. Of course, you'll have to process
62 .\" the output yourself in some meaningful fashion.
63 .if \nF \{\
64 . de IX
65 . tm Index:\\$1\t\\n%\t"\\$2"
66 . .
67 . nr % 0
68 . rr F
69 .\}
70 .\"
71 .\" For nroff, turn off justification. Always turn off hyphenation; it
72 .\" makes way too many mistakes in technical documents.
73 .hy 0
74 .\"
75 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
76 .\" Fear. Run. Save yourself. No user-serviceable parts.
77 .bd B 3
78 . \" fudge factors for nroff and troff
79 .if n \{\
80 . ds #H 0
81 . ds #V .8m
82 . ds #F .3m
83 . ds #[ \f1
84 . ds #] \fP
85 .\}
86 .if t \{\
87 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
88 . ds #V .6m
89 . ds #F 0
90 . ds #[ \&
91 . ds #] \&
92 .\}
93 . \" simple accents for nroff and troff
94 .if n \{\
95 . ds ' \&
96 . ds ` \&
97 . ds ^ \&
98 . ds , \&
99 . ds ~ ~
100 . ds /
101 .\}
102 .if t \{\
103 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
104 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
105 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
106 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
107 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
108 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
109 .\}
110 . \" troff and (daisy-wheel) nroff accents
111 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
112 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
113 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
114 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
115 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
116 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
117 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
118 .ds ae a\h'-(\w'a'u*4/10)'e
119 .ds Ae A\h'-(\w'A'u*4/10)'E
120 . \" corrections for vroff
121 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
122 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
123 . \" for low resolution devices (crt and lpr)
124 .if \n(.H>23 .if \n(.V>19 \
125 \{\
126 . ds : e
127 . ds 8 ss
128 . ds o a
129 . ds d- d\h'-1'\(ga
130 . ds D- D\h'-1'\(hy
131 . ds th \o'bp'
132 . ds Th \o'LP'
133 . ds ae ae
134 . ds Ae AE
135 .\}
136 .rm #[ #] #H #V #F C
137 .\" ======================================================================
138 .\"
139 .IX Title "NM.1 1"
140 .TH NM.1 1 "binutils-2.11.90" "2001-05-30" "GNU"
141 .UC
142 .SH "NAME"
143 nm \- list symbols from object files
144 .SH "SYNOPSIS"
145 .IX Header "SYNOPSIS"
146 nm [ \-a | \-\-debug-syms ] [ \-g | \-\-extern-only ]
147 [ \-B ] [ \-C | \-\-demangle[=\fIstyle\fR] ] [ \-D | \-\-dynamic ]
148 [ \-s | \-\-print-armap ] [ \-A | \-o | \-\-print-file-name ]
149 [ \-n | \-v | \-\-numeric-sort ] [ \-p | \-\-no-sort ]
150 [ \-r | \-\-reverse-sort ] [ \-\-size-sort ] [ \-u | \-\-undefined-only ]
151 [ \-t \fIradix\fR | \-\-radix=\fIradix\fR ] [ \-P | \-\-portability ]
152 [ \-\-target=\fIbfdname\fR ] [ \-f \fIformat\fR | \-\-format=\fIformat\fR ]
153 [ \-\-defined-only ] [\-l | \-\-line-numbers ] [ \-\-no-demangle ]
154 [ \-V | \-\-version ] [ \-X 32_64 ] [ \-\-help ] [ \fIobjfile\fR... ]
155 .SH "DESCRIPTION"
156 .IX Header "DESCRIPTION"
157 \&\s-1GNU\s0 \f(CW\*(C`nm\*(C'\fR lists the symbols from object files \fIobjfile\fR....
158 If no object files are listed as arguments, \f(CW\*(C`nm\*(C'\fR assumes the file
159 \&\fIa.out\fR.
160 .PP
161 For each symbol, \f(CW\*(C`nm\*(C'\fR shows:
162 .Ip "\(bu" 4
163 The symbol value, in the radix selected by options (see below), or
164 hexadecimal by default.
165 .Ip "\(bu" 4
166 The symbol type. At least the following types are used; others are, as
167 well, depending on the object file format. If lowercase, the symbol is
168 local; if uppercase, the symbol is global (external).
169 .RS 4
170 .Ip "\f(CW\*(C`A\*(C'\fR" 4
171 .IX Item "A"
172 The symbol's value is absolute, and will not be changed by further
173 linking.
174 .Ip "\f(CW\*(C`B\*(C'\fR" 4
175 .IX Item "B"
176 The symbol is in the uninitialized data section (known as \s-1BSS\s0).
177 .Ip "\f(CW\*(C`C\*(C'\fR" 4
178 .IX Item "C"
179 The symbol is common. Common symbols are uninitialized data. When
180 linking, multiple common symbols may appear with the same name. If the
181 symbol is defined anywhere, the common symbols are treated as undefined
182 references.
183 .Ip "\f(CW\*(C`D\*(C'\fR" 4
184 .IX Item "D"
185 The symbol is in the initialized data section.
186 .Ip "\f(CW\*(C`G\*(C'\fR" 4
187 .IX Item "G"
188 The symbol is in an initialized data section for small objects. Some
189 object file formats permit more efficient access to small data objects,
190 such as a global int variable as opposed to a large global array.
191 .Ip "\f(CW\*(C`I\*(C'\fR" 4
192 .IX Item "I"
193 The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0
194 extension to the a.out object file format which is rarely used.
195 .Ip "\f(CW\*(C`N\*(C'\fR" 4
196 .IX Item "N"
197 The symbol is a debugging symbol.
198 .Ip "\f(CW\*(C`R\*(C'\fR" 4
199 .IX Item "R"
200 The symbol is in a read only data section.
201 .Ip "\f(CW\*(C`S\*(C'\fR" 4
202 .IX Item "S"
203 The symbol is in an uninitialized data section for small objects.
204 .Ip "\f(CW\*(C`T\*(C'\fR" 4
205 .IX Item "T"
206 The symbol is in the text (code) section.
207 .Ip "\f(CW\*(C`U\*(C'\fR" 4
208 .IX Item "U"
209 The symbol is undefined.
210 .Ip "\f(CW\*(C`V\*(C'\fR" 4
211 .IX Item "V"
212 The symbol is a weak object. When a weak defined symbol is linked with
213 a normal defined symbol, the normal defined symbol is used with no error.
214 When a weak undefined symbol is linked and the symbol is not defined,
215 the value of the weak symbol becomes zero with no error.
216 .Ip "\f(CW\*(C`W\*(C'\fR" 4
217 .IX Item "W"
218 The symbol is a weak symbol that has not been specifically tagged as a
219 weak object symbol. When a weak defined symbol is linked with a normal
220 defined symbol, the normal defined symbol is used with no error.
221 When a weak undefined symbol is linked and the symbol is not defined,
222 the value of the weak symbol becomes zero with no error.
223 .Ip "\f(CW\*(C`\-\*(C'\fR" 4
224 .IX Item "-"
225 The symbol is a stabs symbol in an a.out object file. In this case, the
226 next values printed are the stabs other field, the stabs desc field, and
227 the stab type. Stabs symbols are used to hold debugging information;
228 for more information, see \f(CW@ref\fR{Top,Stabs,Stabs Overview,stabs.info, The
229 ``stabs'' debug format}.
230 .Ip "\f(CW\*(C`?\*(C'\fR" 4
231 .IX Item "?"
232 The symbol type is unknown, or object file format specific.
233 .RE
234 .RS 4
235 .RE
236 .Ip "\(bu" 4
237 The symbol name.
238 .SH "OPTIONS"
239 .IX Header "OPTIONS"
240 The long and short forms of options, shown here as alternatives, are
241 equivalent.
242 .Ip "\f(CW\*(C`\-A\*(C'\fR" 4
243 .IX Item "-A"
244 .Ip "\f(CW\*(C`\-o\*(C'\fR" 4
245 .IX Item "-o"
246 .Ip "\f(CW\*(C`\-\-print\-file\-name \*(C'\fR" 4
247 .IX Item "--print-file-name "
248 Precede each symbol by the name of the input file (or archive member)
249 in which it was found, rather than identifying the input file once only,
250 before all of its symbols.
251 .Ip "\f(CW\*(C`\-a\*(C'\fR" 4
252 .IX Item "-a"
253 .Ip "\f(CW\*(C`\-\-debug\-syms \*(C'\fR" 4
254 .IX Item "--debug-syms "
255 Display all symbols, even debugger-only symbols; normally these are not
256 listed.
257 .Ip "\f(CW\*(C`\-B\*(C'\fR" 4
258 .IX Item "-B"
259 The same as \fB\*(--format=bsd\fR (for compatibility with the \s-1MIPS\s0 \f(CW\*(C`nm\*(C'\fR).
260 .Ip "\f(CW\*(C`\-C\*(C'\fR" 4
261 .IX Item "-C"
262 .Ip "\f(CW\*(C`\-\-demangle[=\f(CIstyle\f(CW]\*(C'\fR" 4
263 .IX Item "--demangle[=style]"
264 Decode (\fIdemangle\fR) low-level symbol names into user-level names.
265 Besides removing any initial underscore prepended by the system, this
266 makes \*(C+ function names readable. Different compilers have different
267 mangling styles. The optional demangling style argument can be used to
268 choose an appropriate demangling style for your compiler.
269 .Ip "\f(CW\*(C`\-\-no\-demangle\*(C'\fR" 4
270 .IX Item "--no-demangle"
271 Do not demangle low-level symbol names. This is the default.
272 .Ip "\f(CW\*(C`\-D\*(C'\fR" 4
273 .IX Item "-D"
274 .Ip "\f(CW\*(C`\-\-dynamic\*(C'\fR" 4
275 .IX Item "--dynamic"
276 Display the dynamic symbols rather than the normal symbols. This is
277 only meaningful for dynamic objects, such as certain types of shared
278 libraries.
279 .Ip "\f(CW\*(C`\-f \f(CIformat\f(CW\*(C'\fR" 4
280 .IX Item "-f format"
281 .Ip "\f(CW\*(C`\-\-format=\f(CIformat\f(CW\*(C'\fR" 4
282 .IX Item "--format=format"
283 Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR,
284 \&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR.
285 Only the first character of \fIformat\fR is significant; it can be
286 either upper or lower case.
287 .Ip "\f(CW\*(C`\-g\*(C'\fR" 4
288 .IX Item "-g"
289 .Ip "\f(CW\*(C`\-\-extern\-only \*(C'\fR" 4
290 .IX Item "--extern-only "
291 Display only external symbols.
292 .Ip "\f(CW\*(C`\-l\*(C'\fR" 4
293 .IX Item "-l"
294 .Ip "\f(CW\*(C`\-\-line\-numbers\*(C'\fR" 4
295 .IX Item "--line-numbers"
296 For each symbol, use debugging information to try to find a filename and
297 line number. For a defined symbol, look for the line number of the
298 address of the symbol. For an undefined symbol, look for the line
299 number of a relocation entry which refers to the symbol. If line number
300 information can be found, print it after the other symbol information.
301 .Ip "\f(CW\*(C`\-n\*(C'\fR" 4
302 .IX Item "-n"
303 .Ip "\f(CW\*(C`\-v\*(C'\fR" 4
304 .IX Item "-v"
305 .Ip "\f(CW\*(C`\-\-numeric\-sort \*(C'\fR" 4
306 .IX Item "--numeric-sort "
307 Sort symbols numerically by their addresses, rather than alphabetically
308 by their names.
309 .Ip "\f(CW\*(C`\-p\*(C'\fR" 4
310 .IX Item "-p"
311 .Ip "\f(CW\*(C`\-\-no\-sort \*(C'\fR" 4
312 .IX Item "--no-sort "
313 Do not bother to sort the symbols in any order; print them in the order
314 encountered.
315 .Ip "\f(CW\*(C`\-P\*(C'\fR" 4
316 .IX Item "-P"
317 .Ip "\f(CW\*(C`\-\-portability\*(C'\fR" 4
318 .IX Item "--portability"
319 Use the \s-1POSIX\s0.2 standard output format instead of the default format.
320 Equivalent to \fB\-f posix\fR.
321 .Ip "\f(CW\*(C`\-s\*(C'\fR" 4
322 .IX Item "-s"
323 .Ip "\f(CW\*(C`\-\-print\-armap\*(C'\fR" 4
324 .IX Item "--print-armap"
325 When listing symbols from archive members, include the index: a mapping
326 (stored in the archive by \f(CW\*(C`ar\*(C'\fR or \f(CW\*(C`ranlib\*(C'\fR) of which modules
327 contain definitions for which names.
328 .Ip "\f(CW\*(C`\-r\*(C'\fR" 4
329 .IX Item "-r"
330 .Ip "\f(CW\*(C`\-\-reverse\-sort \*(C'\fR" 4
331 .IX Item "--reverse-sort "
332 Reverse the order of the sort (whether numeric or alphabetic); let the
333 last come first.
334 .Ip "\f(CW\*(C`\-\-size\-sort\*(C'\fR" 4
335 .IX Item "--size-sort"
336 Sort symbols by size. The size is computed as the difference between
337 the value of the symbol and the value of the symbol with the next higher
338 value. The size of the symbol is printed, rather than the value.
339 .Ip "\f(CW\*(C`\-t \f(CIradix\f(CW\*(C'\fR" 4
340 .IX Item "-t radix"
341 .Ip "\f(CW\*(C`\-\-radix=\f(CIradix\f(CW\*(C'\fR" 4
342 .IX Item "--radix=radix"
343 Use \fIradix\fR as the radix for printing the symbol values. It must be
344 \&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal.
345 .Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
346 .IX Item "--target=bfdname"
347 Specify an object code format other than your system's default format.
348 .Ip "\f(CW\*(C`\-u\*(C'\fR" 4
349 .IX Item "-u"
350 .Ip "\f(CW\*(C`\-\-undefined\-only \*(C'\fR" 4
351 .IX Item "--undefined-only "
352 Display only undefined symbols (those external to each object file).
353 .Ip "\f(CW\*(C`\-\-defined\-only\*(C'\fR" 4
354 .IX Item "--defined-only"
355 Display only defined symbols for each object file.
356 .Ip "\f(CW\*(C`\-V\*(C'\fR" 4
357 .IX Item "-V"
358 .Ip "\f(CW\*(C`\-\-version\*(C'\fR" 4
359 .IX Item "--version"
360 Show the version number of \f(CW\*(C`nm\*(C'\fR and exit.
361 .Ip "\f(CW\*(C`\-X\*(C'\fR" 4
362 .IX Item "-X"
363 This option is ignored for compatibility with the \s-1AIX\s0 version of
364 \&\f(CW\*(C`nm\*(C'\fR. It takes one parameter which must be the string
365 \&\f(CW\*(C`32_64\*(C'\fR. The default mode of \s-1AIX\s0 \f(CW\*(C`nm\*(C'\fR corresponds
366 to \f(CW\*(C`\-X 32\*(C'\fR, which is not supported by \s-1GNU\s0 \f(CW\*(C`nm\*(C'\fR.
367 .Ip "\f(CW\*(C`\-\-help\*(C'\fR" 4
368 .IX Item "--help"
369 Show a summary of the options to \f(CW\*(C`nm\*(C'\fR and exit.
370 .SH "SEE ALSO"
371 .IX Header "SEE ALSO"
372 \&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
373 .SH "COPYRIGHT"
374 .IX Header "COPYRIGHT"
375 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
376 .PP
377 Permission is granted to copy, distribute and/or modify this document
378 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
379 or any later version published by the Free Software Foundation;
380 with no Invariant Sections, with no Front-Cover Texts, and with no
381 Back-Cover Texts. A copy of the license is included in the
382 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
This page took 0.04124 seconds and 4 git commands to generate.