Viewing Symbols in an Object file with nm(1)
The nm(1) command displays the symbol table of each specified object. The file can be a relocatable object file or an executable object file, or an archive of relocatable or executable object files.
The nm command provides three general output formats: the default (neither
To do this | Use the option |
|
|
Prefix each output line with the name of the object file or archive file. Equivalent to | |
| |
|
|
Demangle C++ names before printing them. | |
|
|
Display the value and size of a symbol in decimal. This is the default for the default | |
format or the |
|
|
|
Display only external and static symbols. This option is ignored (see | |
|
|
Display full output. This option is in force by default. | |
|
|
Display only external (global) symbol information. | |
|
|
Do not display the output header data. | |
|
|
Distinguish between weak and global symbols by appending * to the key letter of | |
weak symbols. Only takes effect with |
|
|
|
Sort symbols by name, in ascending collation order before they are printed. This is | |
the default. To turn off this option, use |
|
|
|
Display symbols in the order in which they appear in the symbol table. | |
|
|
Display the value and size of a symbol in octal. Equivalent to | |
|
|
Display information in a |
|
by its value (blanks if undefined) and one of the letters. Lower case letters indicate |
|
local values. Upper case letters indicate global values. |
|
absolute |
|
a, A |
|
bss symbol |
|
b, B |
|
common symbol |
|
c, C |
|
data symbol |
|
d, D | |
| |
milli symbol |
|
m, M |
|
no type |
|
n, N |
|
section region |
|
r, R |
|
text symbol |
|
t, T |
|
undefined symbol |
|
u, U |
|
|
|
Display information in a portable output format to standard output. See the nm(1) | |
manpage for format information. Note that |
|
|
|
56 Linker Tools for