HP-UX Reference (11i v1 00/12) - 1 User Commands N-Z (vol 2)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/neqn.1
________________________________________________________________
___ ___
n
nm(1) nm(1)
NAME
nm - print name list of common object file
SYNOPSIS
/usr/ccs/bin/nm [-ACefghlnNqrsTuUvV][-d-o-x][-p-P][-t format] file ...
DESCRIPTION
The nm command displays the symbol table of each object le, file.
file can be a relocatable object file or an executable object file, or it can be an archive of relocatable or exe-
cutable object files.
There are three general output formats: the default (neither -p nor -P specified), -p specified, and -P
specified. The output formats are described after the "Options" subsection.
Options
nm recognizes the following options:
-A Prefix each output line with the name of the object file or archive, file. Equivalent to
-r.
-C Demangle C++ names before printing them (ELF only).
-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 -t d.
-e Display only external and static symbols. This option is ignored (see -f).
-f Display full output. This option is in force by default.
-g Display only external (global) symbol information.
-h Do not display the output header data.
-l Distinguish between weak and global symbols by appending * to the key letter of
weak symbols. Only takes effect with -p and/or -P.
-n
Sort symbols by name, in ascending collation order, before they are printed. This is
the default. See "Environment Variables" in EXTERNAL INFLUENCES below.
-N Display symbols in the order in which they appear in the symbol table.
-o Display the value and size of a symbol in octal. Equivalent to -t o.
-p Display information in a blank-separated output format. Each symbol name is pre-
ceded by its value (blanks if undefined) and one of the letters
A (absolute), B (bss sym-
bol),
C (common symbol), D (data symbol), R (section region), S (tstorage symbol), T
(text symbol) or U (undefined). S is used on SOM files only. If the symbol is local
(nonexternal), the type letter is in lowercase. If the symbol is a secondary definition,
the type letter is followed by the letter S. Note that -p is not compatible with -P.
-P Display information in a portable output format, as specified below, to standard out-
put. Note that -P is not compatible with -p.
-q Silence some warning messages (SOM only).
-r Prefix each output line with the name of the object file or archive, file. Equivalent to
-A.
-s Print the section index instead of the section name (ELF only).
-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. Equivalentto -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 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 (SOM only). If
-A
or -r is also specified, the file prefix is truncated first.
HP-UX Release 11i: December 2000 1 Section 1617
___
___