* Makefile.in: Revert 2001-06-17.
[deliverable/binutils-gdb.git] / binutils / nm.1
CommitLineData
16b2b71c
NC
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
0285c67d
NC
7.br
8.if t .Sp
9.ne 5
10.PP
11\fB\\$1\fR
12.PP
252b5132 13..
16b2b71c 14.de Sp \" Vertical space (when we can't use .PP)
0285c67d
NC
15.if t .sp .5v
16.if n .sp
17..
16b2b71c 18.de Ip \" List item
0285c67d
NC
19.br
20.ie \\n(.$>=3 .ne \\$3
21.el .ne 3
22.IP "\\$1" \\$2
23..
16b2b71c 24.de Vb \" Begin verbatim text
0285c67d
NC
25.ft CW
26.nf
27.ne \\$1
28..
16b2b71c 29.de Ve \" End verbatim text
0285c67d 30.ft R
252b5132 31
0285c67d
NC
32.fi
33..
16b2b71c
NC
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<>
0285c67d 40.tr \(*W-|\(bv\*(Tr
16b2b71c 41.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
0285c67d 42.ie n \{\
16b2b71c
NC
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' '
0285c67d
NC
51'br\}
52.el\{\
16b2b71c
NC
53. ds -- \|\(em\|
54. ds PI \(*p
55. ds L" ``
56. ds R" ''
0285c67d 57'br\}
16b2b71c
NC
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
0285c67d 69.\}
16b2b71c
NC
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.
0285c67d 77.bd B 3
16b2b71c 78. \" fudge factors for nroff and troff
0285c67d 79.if n \{\
16b2b71c
NC
80. ds #H 0
81. ds #V .8m
82. ds #F .3m
83. ds #[ \f1
84. ds #] \fP
0285c67d
NC
85.\}
86.if t \{\
16b2b71c
NC
87. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
88. ds #V .6m
89. ds #F 0
90. ds #[ \&
91. ds #] \&
0285c67d 92.\}
16b2b71c 93. \" simple accents for nroff and troff
0285c67d 94.if n \{\
16b2b71c
NC
95. ds ' \&
96. ds ` \&
97. ds ^ \&
98. ds , \&
99. ds ~ ~
100. ds /
0285c67d
NC
101.\}
102.if t \{\
16b2b71c
NC
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'
0285c67d 109.\}
16b2b71c 110. \" troff and (daisy-wheel) nroff accents
0285c67d
NC
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'
0285c67d
NC
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
16b2b71c 120. \" corrections for vroff
0285c67d
NC
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'
16b2b71c 123. \" for low resolution devices (crt and lpr)
0285c67d
NC
124.if \n(.H>23 .if \n(.V>19 \
125\{\
16b2b71c
NC
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
0285c67d
NC
135.\}
136.rm #[ #] #H #V #F C
16b2b71c
NC
137.\" ======================================================================
138.\"
139.IX Title "NM.1 1"
140.TH NM.1 1 "binutils-2.11.90" "2001-05-30" "GNU"
141.UC
0285c67d
NC
142.SH "NAME"
143nm \- list symbols from object files
144.SH "SYNOPSIS"
16b2b71c
NC
145.IX Header "SYNOPSIS"
146nm [ \-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... ]
0285c67d 155.SH "DESCRIPTION"
16b2b71c
NC
156.IX Header "DESCRIPTION"
157\&\s-1GNU\s0 \f(CW\*(C`nm\*(C'\fR lists the symbols from object files \fIobjfile\fR....
158If no object files are listed as arguments, \f(CW\*(C`nm\*(C'\fR assumes the file
159\&\fIa.out\fR.
0285c67d 160.PP
16b2b71c 161For each symbol, \f(CW\*(C`nm\*(C'\fR shows:
0285c67d
NC
162.Ip "\(bu" 4
163The symbol value, in the radix selected by options (see below), or
164hexadecimal by default.
165.Ip "\(bu" 4
166The symbol type. At least the following types are used; others are, as
167well, depending on the object file format. If lowercase, the symbol is
168local; if uppercase, the symbol is global (external).
16b2b71c
NC
169.RS 4
170.Ip "\f(CW\*(C`A\*(C'\fR" 4
171.IX Item "A"
0285c67d
NC
172The symbol's value is absolute, and will not be changed by further
173linking.
16b2b71c
NC
174.Ip "\f(CW\*(C`B\*(C'\fR" 4
175.IX Item "B"
0285c67d 176The symbol is in the uninitialized data section (known as \s-1BSS\s0).
16b2b71c
NC
177.Ip "\f(CW\*(C`C\*(C'\fR" 4
178.IX Item "C"
0285c67d
NC
179The symbol is common. Common symbols are uninitialized data. When
180linking, multiple common symbols may appear with the same name. If the
181symbol is defined anywhere, the common symbols are treated as undefined
182references.
16b2b71c
NC
183.Ip "\f(CW\*(C`D\*(C'\fR" 4
184.IX Item "D"
185The symbol is in the initialized data section.
186.Ip "\f(CW\*(C`G\*(C'\fR" 4
187.IX Item "G"
188The symbol is in an initialized data section for small objects. Some
189object file formats permit more efficient access to small data objects,
190such 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"
193The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0
194extension to the a.out object file format which is rarely used.
195.Ip "\f(CW\*(C`N\*(C'\fR" 4
196.IX Item "N"
197The symbol is a debugging symbol.
198.Ip "\f(CW\*(C`R\*(C'\fR" 4
199.IX Item "R"
200The symbol is in a read only data section.
201.Ip "\f(CW\*(C`S\*(C'\fR" 4
202.IX Item "S"
203The symbol is in an uninitialized data section for small objects.
204.Ip "\f(CW\*(C`T\*(C'\fR" 4
205.IX Item "T"
206The symbol is in the text (code) section.
207.Ip "\f(CW\*(C`U\*(C'\fR" 4
208.IX Item "U"
209The symbol is undefined.
210.Ip "\f(CW\*(C`V\*(C'\fR" 4
211.IX Item "V"
212The symbol is a weak object. When a weak defined symbol is linked with
213a normal defined symbol, the normal defined symbol is used with no error.
214When a weak undefined symbol is linked and the symbol is not defined,
215the value of the weak symbol becomes zero with no error.
216.Ip "\f(CW\*(C`W\*(C'\fR" 4
217.IX Item "W"
218The symbol is a weak symbol that has not been specifically tagged as a
219weak object symbol. When a weak defined symbol is linked with a normal
220defined symbol, the normal defined symbol is used with no error.
221When a weak undefined symbol is linked and the symbol is not defined,
222the value of the weak symbol becomes zero with no error.
223.Ip "\f(CW\*(C`\-\*(C'\fR" 4
224.IX Item "-"
225The symbol is a stabs symbol in an a.out object file. In this case, the
226next values printed are the stabs other field, the stabs desc field, and
227the stab type. Stabs symbols are used to hold debugging information;
228for 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 "?"
232The symbol type is unknown, or object file format specific.
233.RE
234.RS 4
235.RE
236.Ip "\(bu" 4
237The symbol name.
0285c67d 238.SH "OPTIONS"
16b2b71c
NC
239.IX Header "OPTIONS"
240The long and short forms of options, shown here as alternatives, are
241equivalent.
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 "
248Precede each symbol by the name of the input file (or archive member)
249in which it was found, rather than identifying the input file once only,
250before 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 "
255Display all symbols, even debugger-only symbols; normally these are not
256listed.
257.Ip "\f(CW\*(C`\-B\*(C'\fR" 4
258.IX Item "-B"
259The 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]"
264Decode (\fIdemangle\fR) low-level symbol names into user-level names.
265Besides removing any initial underscore prepended by the system, this
266makes \*(C+ function names readable. Different compilers have different
267mangling styles. The optional demangling style argument can be used to
268choose an appropriate demangling style for your compiler.
269.Ip "\f(CW\*(C`\-\-no\-demangle\*(C'\fR" 4
270.IX Item "--no-demangle"
271Do 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"
276Display the dynamic symbols rather than the normal symbols. This is
277only meaningful for dynamic objects, such as certain types of shared
278libraries.
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"
283Use 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.
285Only the first character of \fIformat\fR is significant; it can be
286either 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 "
291Display 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"
296For each symbol, use debugging information to try to find a filename and
297line number. For a defined symbol, look for the line number of the
298address of the symbol. For an undefined symbol, look for the line
299number of a relocation entry which refers to the symbol. If line number
300information 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 "
307Sort symbols numerically by their addresses, rather than alphabetically
308by 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 "
313Do not bother to sort the symbols in any order; print them in the order
314encountered.
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"
319Use the \s-1POSIX\s0.2 standard output format instead of the default format.
320Equivalent 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"
325When 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
327contain 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 "
332Reverse the order of the sort (whether numeric or alphabetic); let the
333last come first.
334.Ip "\f(CW\*(C`\-\-size\-sort\*(C'\fR" 4
335.IX Item "--size-sort"
336Sort symbols by size. The size is computed as the difference between
337the value of the symbol and the value of the symbol with the next higher
338value. 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"
343Use \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"
347Specify 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 "
352Display only undefined symbols (those external to each object file).
353.Ip "\f(CW\*(C`\-\-defined\-only\*(C'\fR" 4
354.IX Item "--defined-only"
355Display 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"
360Show 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"
363This 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
366to \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"
369Show a summary of the options to \f(CW\*(C`nm\*(C'\fR and exit.
0285c67d 370.SH "SEE ALSO"
16b2b71c
NC
371.IX Header "SEE ALSO"
372\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
0285c67d 373.SH "COPYRIGHT"
16b2b71c 374.IX Header "COPYRIGHT"
0285c67d 375Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
16b2b71c 376.PP
0285c67d 377Permission is granted to copy, distribute and/or modify this document
16b2b71c 378under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
0285c67d
NC
379or any later version published by the Free Software Foundation;
380with no Invariant Sections, with no Front-Cover Texts, and with no
381Back-Cover Texts. A copy of the license is included in the
16b2b71c 382section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
This page took 0.092967 seconds and 4 git commands to generate.