Home | History | Annotate | Download | only in man1
 Automatically generated by Pod::Man v1.37, Pod::Parser v1.32

Standard preamble:
========================================================================

\\$1

.. ..

..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. | will give a
real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\}
If the F register is turned on, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
. de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\}
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.

Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "NM 1"
NM 1 "2008-09-10" "binutils-2.18.90" "GNU Development Tools"
"NAME"
nm - list symbols from object files
"SYNOPSIS"
Header "SYNOPSIS" nm [-a|--debug-syms] [-g|--extern-only] [-B] [-C|--demangle[=style]] [-D|--dynamic] [-S|--print-size] [-s|--print-armap] [-A|-o|--print-file-name][--special-syms] [-n|-v|--numeric-sort] [-p|--no-sort] [-r|--reverse-sort] [--size-sort] [-u|--undefined-only] [-t radix|--radix=radix] [-P|--portability] [--target=bfdname] [-fformat|--format=format] [--defined-only] [-l|--line-numbers] [--no-demangle] [-V|--version] [-X 32_64] [--help] [objfile...]
"DESCRIPTION"
Header "DESCRIPTION" \s-1GNU\s0 nm lists the symbols from object files objfile.... If no object files are listed as arguments, nm assumes the file \fIa.out.

For each symbol, nm shows:

"\(bu" 4
The symbol value, in the radix selected by options (see below), or hexadecimal by default.
"\(bu" 4
The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is local; if uppercase, the symbol is global (external). Item "A" The symbol's value is absolute, and will not be changed by further linking. Item "B"

0 Item "b"

The symbol is in the uninitialized data section (known as \s-1BSS\s0). Item "C" The symbol is common. Common symbols are uninitialized data. When linking, multiple common symbols may appear with the same name. If the symbol is defined anywhere, the common symbols are treated as undefined references. Item "D"

0 Item "d"

The symbol is in the initialized data section. Item "G"

0 Item "g"

The symbol is in an initialized data section for small objects. Some object file formats permit more efficient access to small data objects, such as a global int variable as opposed to a large global array. Item "I" The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0 extension to the a.out object file format which is rarely used. Item "i" The symbol is in a section specific to the implementation of DLLs. Item "N" The symbol is a debugging symbol. Item "p" The symbols is in a stack unwind section. Item "R"

0 Item "r"

The symbol is in a read only data section. Item "S"

0 Item "s"

The symbol is in an uninitialized data section for small objects. Item "T"

0 Item "t"

The symbol is in the text (code) section. Item "U" The symbol is undefined. Item "V"

0 Item "v"

The symbol is a weak object. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the weak symbol becomes zero with no error. On some systems, uppercase indicates that a default value has been specified. Item "W"

0 Item "w"

The symbol is a weak symbol that has not been specifically tagged as a weak object symbol. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the symbol is determined in a system-specific manner without error. On some systems, uppercase indicates that a default value has been specified. Item "-" The symbol is a stabs symbol in an a.out object file. In this case, the next values printed are the stabs other field, the stabs desc field, and the stab type. Stabs symbols are used to hold debugging information. Item "?" The symbol type is unknown, or object file format specific.

"\(bu" 4
The symbol name.
"OPTIONS"
Header "OPTIONS" The long and short forms of options, shown here as alternatives, are equivalent.
"-A" 4
Item "-A"

0

"-o" 4
Item "-o"
"--print-file-name" 4
Item "--print-file-name"

Precede each symbol by the name of the input file (or archive member) in which it was found, rather than identifying the input file once only, before all of its symbols.

"-a" 4
Item "-a"

0

"--debug-syms" 4
Item "--debug-syms"

Display all symbols, even debugger-only symbols; normally these are not listed.

"-B" 4
Item "-B" The same as --format=bsd (for compatibility with the \s-1MIPS\s0 nm).
"-C" 4
Item "-C"

0

"--demangle[=style]" 4
Item "--demangle[=style]"

Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes \*(C+ function names readable. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler.

"--no-demangle" 4
Item "--no-demangle" Do not demangle low-level symbol names. This is the default.
"-D" 4
Item "-D"

0

"--dynamic" 4
Item "--dynamic"

Display the dynamic symbols rather than the normal symbols. This is only meaningful for dynamic objects, such as certain types of shared libraries.

"-f format" 4
Item "-f format"

0

"--format=format" 4
Item "--format=format"

Use the output format format, which can be \*(C`bsd\*(C', \f(CW\*(C`sysv\*(C', or \*(C`posix\*(C'. The default is \*(C`bsd\*(C'. Only the first character of format is significant; it can be either upper or lower case.

"-g" 4
Item "-g"

0

"--extern-only" 4
Item "--extern-only"

Display only external symbols.

"-l" 4
Item "-l"

0

"--line-numbers" 4
Item "--line-numbers"

For each symbol, use debugging information to try to find a filename and line number. For a defined symbol, look for the line number of the address of the symbol. For an undefined symbol, look for the line number of a relocation entry which refers to the symbol. If line number information can be found, print it after the other symbol information.

"-n" 4
Item "-n"

0

"-v" 4
Item "-v"
"--numeric-sort" 4
Item "--numeric-sort"

Sort symbols numerically by their addresses, rather than alphabetically by their names.

"-p" 4
Item "-p"

0

"--no-sort" 4
Item "--no-sort"

Do not bother to sort the symbols in any order; print them in the order encountered.

"-P" 4
Item "-P"

0

"--portability" 4
Item "--portability"

Use the \s-1POSIX\s0.2 standard output format instead of the default format. Equivalent to -f posix.

"-S" 4
Item "-S"

0

"--print-size" 4
Item "--print-size"

Print size, not the value, of defined symbols for the \*(C`bsd\*(C' output format.

"-s" 4
Item "-s"

0

"--print-armap" 4
Item "--print-armap"

When listing symbols from archive members, include the index: a mapping (stored in the archive by ar or ranlib) of which modules contain definitions for which names.

"-r" 4
Item "-r"

0

"--reverse-sort" 4
Item "--reverse-sort"

Reverse the order of the sort (whether numeric or alphabetic); let the last come first.

"--size-sort" 4
Item "--size-sort" Sort symbols by size. The size is computed as the difference between the value of the symbol and the value of the symbol with the next higher value. If the \*(C`bsd\*(C' output format is used the size of the symbol is printed, rather than the value, and -S must be used in order both size and value to be printed.
"--special-syms" 4
Item "--special-syms" Display symbols which have a target-specific special meaning. These symbols are usually used by the target for some special processing and are not normally helpful when included included in the normal symbol lists. For example for \s-1ARM\s0 targets this option would skip the mapping symbols used to mark transitions between \s-1ARM\s0 code, \s-1THUMB\s0 code and data.
"-t radix" 4
Item "-t radix"

0

"--radix=radix" 4
Item "--radix=radix"

Use radix as the radix for printing the symbol values. It must be \fBd for decimal, o for octal, or x for hexadecimal.

"--target=bfdname" 4
Item "--target=bfdname" Specify an object code format other than your system's default format.
"-u" 4
Item "-u"

0

"--undefined-only" 4
Item "--undefined-only"

Display only undefined symbols (those external to each object file).

"--defined-only" 4
Item "--defined-only" Display only defined symbols for each object file.
"-V" 4
Item "-V"

0

"--version" 4
Item "--version"

Show the version number of nm and exit.

"-X" 4
Item "-X" This option is ignored for compatibility with the \s-1AIX\s0 version of \fBnm. It takes one parameter which must be the string \fB32_64. The default mode of \s-1AIX\s0 nm corresponds to -X 32, which is not supported by \s-1GNU\s0 nm.
"--help" 4
Item "--help" Show a summary of the options to nm and exit.
"@file" 4
Item "@file" Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
"SEE ALSO"
Header "SEE ALSO" \fIar\|(1), objdump\|(1), ranlib\|(1), and the Info entries for binutils.
"COPYRIGHT"
Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".