1 .\" Automatically generated by Pod::Man version 1.15
2 .\" Thu Jan 19 19:58:08 2006
5 .\" ======================================================================
6 .de Sh \" Subsection heading
14 .de Sp \" Vertical space (when we can't use .PP)
20 .ie \\n(.$>=3 .ne \\$3
24 .de Vb \" Begin verbatim text
29 .de Ve \" End verbatim text
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<>
41 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
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
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.
65 . tm Index:\\$1\t\\n%\t"\\$2"
71 .\" For nroff, turn off justification. Always turn off hyphenation; it
72 .\" makes way too many mistakes in technical documents.
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.
78 . \" fudge factors for nroff and troff
87 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
93 . \" simple accents for nroff and troff
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'
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 \
137 .\" ======================================================================
140 .TH NM 1 "binutils-2.16.91" "2006-01-19" "GNU Development Tools"
143 nm \- list symbols from object files
145 .IX Header "SYNOPSIS"
146 nm [\fB\-a\fR|\fB\*(--debug-syms\fR] [\fB\-g\fR|\fB\*(--extern-only\fR]
147 [\fB\-B\fR] [\fB\-C\fR|\fB\*(--demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\*(--dynamic\fR]
148 [\fB\-S\fR|\fB\*(--print-size\fR] [\fB\-s\fR|\fB\*(--print-armap\fR]
149 [\fB\-A\fR|\fB\-o\fR|\fB\*(--print-file-name\fR][\fB\*(--special-syms\fR]
150 [\fB\-n\fR|\fB\-v\fR|\fB\*(--numeric-sort\fR] [\fB\-p\fR|\fB\*(--no-sort\fR]
151 [\fB\-r\fR|\fB\*(--reverse-sort\fR] [\fB\*(--size-sort\fR] [\fB\-u\fR|\fB\*(--undefined-only\fR]
152 [\fB\-t\fR \fIradix\fR|\fB\*(--radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\*(--portability\fR]
153 [\fB\*(--target=\fR\fIbfdname\fR] [\fB\-f\fR\fIformat\fR|\fB\*(--format=\fR\fIformat\fR]
154 [\fB\*(--defined-only\fR] [\fB\-l\fR|\fB\*(--line-numbers\fR] [\fB\*(--no-demangle\fR]
155 [\fB\-V\fR|\fB\*(--version\fR] [\fB\-X 32_64\fR] [\fB\*(--help\fR] [\fIobjfile\fR...]
157 .IX Header "DESCRIPTION"
158 \&\s-1GNU\s0 \fBnm\fR lists the symbols from object files \fIobjfile\fR....
159 If no object files are listed as arguments, \fBnm\fR assumes the file
162 For each symbol, \fBnm\fR shows:
164 The symbol value, in the radix selected by options (see below), or
165 hexadecimal by default.
167 The symbol type. At least the following types are used; others are, as
168 well, depending on the object file format. If lowercase, the symbol is
169 local; if uppercase, the symbol is global (external).
171 .if n .Ip "\f(CW""""A""""\fR" 4
172 .el .Ip "\f(CWA\fR" 4
174 The symbol's value is absolute, and will not be changed by further
176 .if n .Ip "\f(CW""""B""""\fR" 4
177 .el .Ip "\f(CWB\fR" 4
179 The symbol is in the uninitialized data section (known as \s-1BSS\s0).
180 .if n .Ip "\f(CW""""C""""\fR" 4
181 .el .Ip "\f(CWC\fR" 4
183 The symbol is common. Common symbols are uninitialized data. When
184 linking, multiple common symbols may appear with the same name. If the
185 symbol is defined anywhere, the common symbols are treated as undefined
187 .if n .Ip "\f(CW""""D""""\fR" 4
188 .el .Ip "\f(CWD\fR" 4
190 The symbol is in the initialized data section.
191 .if n .Ip "\f(CW""""G""""\fR" 4
192 .el .Ip "\f(CWG\fR" 4
194 The symbol is in an initialized data section for small objects. Some
195 object file formats permit more efficient access to small data objects,
196 such as a global int variable as opposed to a large global array.
197 .if n .Ip "\f(CW""""I""""\fR" 4
198 .el .Ip "\f(CWI\fR" 4
200 The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0
201 extension to the a.out object file format which is rarely used.
202 .if n .Ip "\f(CW""""N""""\fR" 4
203 .el .Ip "\f(CWN\fR" 4
205 The symbol is a debugging symbol.
206 .if n .Ip "\f(CW""""R""""\fR" 4
207 .el .Ip "\f(CWR\fR" 4
209 The symbol is in a read only data section.
210 .if n .Ip "\f(CW""""S""""\fR" 4
211 .el .Ip "\f(CWS\fR" 4
213 The symbol is in an uninitialized data section for small objects.
214 .if n .Ip "\f(CW""""T""""\fR" 4
215 .el .Ip "\f(CWT\fR" 4
217 The symbol is in the text (code) section.
218 .if n .Ip "\f(CW""""U""""\fR" 4
219 .el .Ip "\f(CWU\fR" 4
221 The symbol is undefined.
222 .if n .Ip "\f(CW""""V""""\fR" 4
223 .el .Ip "\f(CWV\fR" 4
225 The symbol is a weak object. When a weak defined symbol is linked with
226 a normal defined symbol, the normal defined symbol is used with no error.
227 When a weak undefined symbol is linked and the symbol is not defined,
228 the value of the weak symbol becomes zero with no error.
229 .if n .Ip "\f(CW""""W""""\fR" 4
230 .el .Ip "\f(CWW\fR" 4
232 The symbol is a weak symbol that has not been specifically tagged as a
233 weak object symbol. When a weak defined symbol is linked with a normal
234 defined symbol, the normal defined symbol is used with no error.
235 When a weak undefined symbol is linked and the symbol is not defined,
236 the value of the symbol is determined in a system-specific manner without
237 error. On some systems, uppercase indicates that a default value has been
239 .if n .Ip "\f(CW""""\-""""\fR" 4
240 .el .Ip "\f(CW\-\fR" 4
242 The symbol is a stabs symbol in an a.out object file. In this case, the
243 next values printed are the stabs other field, the stabs desc field, and
244 the stab type. Stabs symbols are used to hold debugging information.
245 .if n .Ip "\f(CW""""?""""\fR" 4
246 .el .Ip "\f(CW?\fR" 4
248 The symbol type is unknown, or object file format specific.
256 The long and short forms of options, shown here as alternatives, are
263 .Ip "\fB\*(--print-file-name\fR" 4
264 .IX Item "print-file-name"
266 Precede each symbol by the name of the input file (or archive member)
267 in which it was found, rather than identifying the input file once only,
268 before all of its symbols.
272 .Ip "\fB\*(--debug-syms\fR" 4
273 .IX Item "debug-syms"
275 Display all symbols, even debugger-only symbols; normally these are not
279 The same as \fB\*(--format=bsd\fR (for compatibility with the \s-1MIPS\s0 \fBnm\fR).
283 .Ip "\fB\*(--demangle[=\fR\fIstyle\fR\fB]\fR" 4
284 .IX Item "demangle[=style]"
286 Decode (\fIdemangle\fR) low-level symbol names into user-level names.
287 Besides removing any initial underscore prepended by the system, this
288 makes \*(C+ function names readable. Different compilers have different
289 mangling styles. The optional demangling style argument can be used to
290 choose an appropriate demangling style for your compiler.
291 .Ip "\fB\*(--no-demangle\fR" 4
292 .IX Item "no-demangle"
293 Do not demangle low-level symbol names. This is the default.
297 .Ip "\fB\*(--dynamic\fR" 4
300 Display the dynamic symbols rather than the normal symbols. This is
301 only meaningful for dynamic objects, such as certain types of shared
303 .Ip "\fB\-f\fR \fIformat\fR" 4
306 .Ip "\fB\*(--format=\fR\fIformat\fR" 4
307 .IX Item "format=format"
309 Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR,
310 \&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR.
311 Only the first character of \fIformat\fR is significant; it can be
312 either upper or lower case.
316 .Ip "\fB\*(--extern-only\fR" 4
317 .IX Item "extern-only"
319 Display only external symbols.
323 .Ip "\fB\*(--line-numbers\fR" 4
324 .IX Item "line-numbers"
326 For each symbol, use debugging information to try to find a filename and
327 line number. For a defined symbol, look for the line number of the
328 address of the symbol. For an undefined symbol, look for the line
329 number of a relocation entry which refers to the symbol. If line number
330 information can be found, print it after the other symbol information.
336 .Ip "\fB\*(--numeric-sort\fR" 4
337 .IX Item "numeric-sort"
339 Sort symbols numerically by their addresses, rather than alphabetically
344 .Ip "\fB\*(--no-sort\fR" 4
347 Do not bother to sort the symbols in any order; print them in the order
352 .Ip "\fB\*(--portability\fR" 4
353 .IX Item "portability"
355 Use the \s-1POSIX\s0.2 standard output format instead of the default format.
356 Equivalent to \fB\-f posix\fR.
360 .Ip "\fB\*(--print-size\fR" 4
361 .IX Item "print-size"
363 Print size, not the value, of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format.
367 .Ip "\fB\*(--print-armap\fR" 4
368 .IX Item "print-armap"
370 When listing symbols from archive members, include the index: a mapping
371 (stored in the archive by \fBar\fR or \fBranlib\fR) of which modules
372 contain definitions for which names.
376 .Ip "\fB\*(--reverse-sort\fR" 4
377 .IX Item "reverse-sort"
379 Reverse the order of the sort (whether numeric or alphabetic); let the
381 .Ip "\fB\*(--size-sort\fR" 4
383 Sort symbols by size. The size is computed as the difference between
384 the value of the symbol and the value of the symbol with the next higher
385 value. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol
386 is printed, rather than the value, and \fB\-S\fR must be used in order
387 both size and value to be printed.
388 .Ip "\fB\*(--special-syms\fR" 4
389 .IX Item "special-syms"
390 Display symbols which have a target-specific special meaning. These
391 symbols are usually used by the target for some special processing and
392 are not normally helpful when included included in the normal symbol
393 lists. For example for \s-1ARM\s0 targets this option would skip the mapping
394 symbols used to mark transistions between \s-1ARM\s0 code, \s-1THUMB\s0 code and
396 .Ip "\fB\-t\fR \fIradix\fR" 4
399 .Ip "\fB\*(--radix=\fR\fIradix\fR" 4
400 .IX Item "radix=radix"
402 Use \fIradix\fR as the radix for printing the symbol values. It must be
403 \&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal.
404 .Ip "\fB\*(--target=\fR\fIbfdname\fR" 4
405 .IX Item "target=bfdname"
406 Specify an object code format other than your system's default format.
410 .Ip "\fB\*(--undefined-only\fR" 4
411 .IX Item "undefined-only"
413 Display only undefined symbols (those external to each object file).
414 .Ip "\fB\*(--defined-only\fR" 4
415 .IX Item "defined-only"
416 Display only defined symbols for each object file.
420 .Ip "\fB\*(--version\fR" 4
423 Show the version number of \fBnm\fR and exit.
426 This option is ignored for compatibility with the \s-1AIX\s0 version of
427 \&\fBnm\fR. It takes one parameter which must be the string
428 \&\fB32_64\fR. The default mode of \s-1AIX\s0 \fBnm\fR corresponds
429 to \fB\-X 32\fR, which is not supported by \s-1GNU\s0 \fBnm\fR.
430 .Ip "\fB\*(--help\fR" 4
432 Show a summary of the options to \fBnm\fR and exit.
433 .Ip "\fB@\fR\fIfile\fR" 4
435 Read command-line options from \fIfile\fR. The options read are
436 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
437 does not exist, or cannot be read, then the option will be treated
438 literally, and not removed.
440 Options in \fIfile\fR are separated by whitespace. A whitespace
441 character may be included in an option by surrounding the entire
442 option in either single or double quotes. Any character (including a
443 backslash) may be included by prefixing the character to be included
444 with a backslash. The \fIfile\fR may itself contain additional
445 @\fIfile\fR options; any such options will be processed recursively.
447 .IX Header "SEE ALSO"
448 \&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
450 .IX Header "COPYRIGHT"
451 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
452 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
454 Permission is granted to copy, distribute and/or modify this document
455 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
456 or any later version published by the Free Software Foundation;
457 with no Invariant Sections, with no Front-Cover Texts, and with no
458 Back-Cover Texts. A copy of the license is included in the
459 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".