NM(1) — Stardent Computer Inc. (Software Generation System Utilities)
NAME
nm − print name list of common object file
SYNOPSIS
nm [−adehnoruxVT] filename ...
DESCRIPTION
The nm command displays the symbol table of each common object file, filename. Filename may be a relocatable or absolute common object file; or it may be an archive of relocatable or absolute common object files. For each symbol, the following information will be printed:
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 is an instance of a structure or of a union then the structure or union tag will be given following the type (e.g., struct-tag). If the symbol is an array, then the array dimensions will be given following the type (e.g., char[ n ][ m ] ). Note that the object file must have been compiled with the −g option of the cc(1) command for this information to appear.
Size Its size in bytes, if available. Note that the object file must have been compiled with the −g option of the cc(1) command for this information to appear.
Section For storage classes static and external, the object file section containing the symbol (e.g., text, data or bss).
The output of nm may be controlled using the following options:
−a Print symbols in the order in which they appear in the symbol table.
−d Print the value of a symbol in decimal rather than hexadecimal.
−e Print only external and static symbols.
−h Do not display the output header data.
−n Sort symbols by name before they are printed.
−o Print the value and size of a symbol in octal instead of decimal.
−r Prepend the name of the object file or archive to each output line.
−u Print undefined symbols only.
−v Sort symbols by value before they are printed (default).
−x Print the value of a symbol in hexadecimal (default).
−V Print the version of the nm command executing on the standard error output.
−T By default, nm prints the entire name of the symbols listed. Since object files can have symbols names with an arbitrary number of characters, a name that is longer than the width of the column set aside for names will overflow its column, forcing every column after the name to be misaligned. The −T option causes nm to truncate every name which would otherwise overflow its column and place an asterisk as the last character in the displayed name to mark it as truncated.
Options may be used in any order, either singly or in combination.
SEE ALSO
as(1), cc(1), ld(1), a.out(4), ar(4).
September 29, 2021