Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

a.out(5)

ar(5)

NM(1)  —  UNIX 3.0

NAME

nm − print name list

SYNOPSIS

nm [ −gnoprsu ] [ file ... ]

DESCRIPTION

Nm prints the name list (symbol table) of each object file in the argument list.  If an argument is an archive, a listing for each object file in the archive will be produced.  If no file is given, the symbols in a.out are listed. 

Each symbol name is preceded by its value (blanks if undefined) and one of the letters U (undefined), A (absolute), T (text segment symbol), D (data segment symbol), B (bss segment symbol), R (register symbol), F (file symbol), or C (common symbol).  If the symbol is local (non-external) the type letter is in lower case.  The output is sorted alphabetically. 

Options are:

−g Print only global (external) symbols. 

−n Sort numerically rather than alphabetically. 

−o Prepend file or archive element name to each output line rather than only once.  This option can be used to make piping to grep(1) more meaningful.

−p Don’t sort; print in symbol-table order. 

−r Sort in reverse order. 

−s Sort according to the size of the external symbol (computed from the difference between the value of the symbol and the value of the symbol with the next highest value).  This difference is the value printed.  This flag turns on −g and −n and turns off −u and −p. 

−u Print only undefined symbols. 

SEE ALSO

ar(1), a.out(5), ar(5). 

May 16, 1980

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026