nm.1 (2010 09)

n
nm(1) nm(1)
-t format Display each numeric value in the specified format. format can be one of:
d Display the value and size of a symbol in decimal. This is the default for the
default format or the -p format. Equivalent to
-d.
o Display the value and size of a symbol in octal. Equivalent to
-o.
x Display the value and size of a symbol in hexadecimal. This is the default for the
-P format. Equivalent to -x.
-T (SOM only) Truncate every name that would otherwise overflow its column and place
an asterisk as the last character in the displayed name to mark it as truncated. If
-A
or -r is also specified, the file prefix is truncated first.
-u Display undefined symbols only.
-U Print the usage menu.
-v Sort symbols by value before they are printed.
-V Display the executing version of the
nm command on standard error.
-x Display the value and size of a symbol in hexadecimal. This is the default for the
-P
format. Equivalent to -t x.
Operands
nm recognizes the following operand:
file A relocatable object file or an executable object file, or an archive of relocatable or exe-
cutable object files.
Default Output Format - SOM
If the default (neither the -p nor the -P option) output format is specified, each symbol has the following
columns, separated by vertical bars (|). The default for numbers is decimal (-d
or -t d).
If decimal:
"%20s|%10d|%6s|%7s|%s",
name, value, scope, type, subspace
If octal:
"%20s|%012o|%6s|%7s|%s",
name, value, scope, type, subspace
If hexadecimal:
"%20s|0x%08x|%6s|%7s|%s",
name, value, scope, type, subspace
Default Output Format - ELF
If the default (neither the
-p nor the -P option) output format is specified, each symbol has the following
columns, separated by vertical bars (|). The default for numbers is decimal (-d
or -t d).
If decimal:
"[%u]%s|%22llu|%8u|%s|%s|%1d|%s|%s",
index, value, size, type, bind, O, shndx, name
If octal:
"[%u]%s|%022llo|%010o|%s|%s|%1o|%s|%s",
index, value, size, type, bind, O, shndx, name
If hexadecimal:
"[%u]%s|0x%016llx|0x%08x|%s|%s|%1x|%s|%s",
index, value, size, type, bind, O, shndx, name
The descriptions are explained below:
name The name of the symbol.
value Its value expressed as an offset or an address depending on its storage class.
scope The scope of the symbol (
external, sdef, static,orundefined). The sdef
scope indicates an external symbol that is flagged as a secondary definition.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010