108 Chapter 4
Linker Tools
Viewing Symbols in an Object file with nm(1)
Display information in a blank-separated output format. Each symbol name
is preceded by its value (blanks if undefined) and one of the letters
Aabsolute
Bbss symbol
Ccommon symbol
Ddata symbol
Rsection region
Ststorage symbol (32-bit mode 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.
Ttext symbol
Uundefined
–p
Display information in a portable output format as specified below, to
standard output. Note that -P is not compatible with -P.-P
32-bit mode SOM files only: Silence some warning messages. -q
Prefix each output line with the name of the object file or archive, file.
Equivalent to –A.-r
64-bit mode ELF files only: Print the section index instead of the section
name. -s
Display each numeric value in the specified format. format can be one of:
dDisplay the value and size of a symbol in decimal. This is
the default for the default format or the –p format.
Equivalent to -d.
oDisplay the value and size of a symbol in octal. Equivalent
to -o.
xDisplay the value and size of a symbol in hexadecimal.
This is the default for the –P format. Equivalent to -x.
–t format
To Use This
Option