nm
PURPOSE
Displays the symbol table of an object file.
SYNOPSIS
nm [ -o ] [ -x ] [ -d ] [ -T ] [ -v ] [ -h ] [ -n ] [ -e ] [ -f ] [ -u ]
files
DESCRIPTION
The nm command writes the symbol table of each specified
object file to standard output. file can be a single
relocatable or absolute common object file or an archive
library of relocatable or absolute common object files.
nm displays the following information for each symbol:
Name The name of the symbol.
Value Its value expressed as an offset or an address
depending on its storage class.
Class Its storage class.
Type Its type and derived type. If the symbol
refers to a structure or a union, the struc-
ture or union tag follows the type declara-
tion. If the symbol is an array, the array
dimensions follow the type. Note that you
must have compiled the object file with cc -g
for this information to appear.
Size Its size in bytes, if available. Note that
you must have compiled the object file with cc
-g for this information to appear.
Line The source line number at which it is defined,
if available. Note that you must have com-
piled the object file with cc -g for this
information to appear.
Section For static and external storage classes, the
object file section containing the symbol.
FLAG
-e Displays only static and external symbols.
-h Does not display output header data.
-n Sorts external symbols by name before displaying them.
Use this flag only in conjunction with the -e flag.
-o Displays a symbol's value and size as an octal rather
than a decimal number.
-T Truncates every name that would otherwise overflow its
column, making the last character displayed in the
name an asterisk. By default, nm displays the entire
name of the symbols listed, and a name that is longer
than the width of the column set aside for it causes
every column after the name to be misaligned.
-u Displays only undefined symbols.
-v Sorts external symbols by value before displaying
them. Use this flag only in conjunction with the -e
flag.
-x Displays a symbol's value and size as a hexadecimal
rather than a decimal number.
FILES
a.out Default input file.
RELATED INFORMATION
The following commands: "ar," "as," "backup," "cc,"
"ld," "size," and "strip."
The a.out and ar files in AIX Operating System Technical
Reference.