xref: /original-bsd/usr.bin/nm/nm.1 (revision 2a4161ef)
Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.

@(#)nm.1 6.2 (Berkeley) 09/10/89

NM 1 ""
C 4
NAME
nm - print name list
SYNOPSIS
nm [ -agnopruw ] [ 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.

The options are as follows:

-a Print symbol table entries inserted for use by debuggers.

-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.

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

-r Sort in reverse order.

-u Print only undefined symbols.

-w Warn about non-object archive members. Normally, nm will silently ignore all archive members which are not object files.

Each symbol name is preceded by its value (a blank field if the symbol is undefined) and one of the following letters:

- debugger symbol table entries (see the -a option).

A absolute

B bss segment symbol

C common symbol

D data segment symbol

f file name

T text segment symbol

U undefined

If the symbol is local (non-external) the type letter is in lower case. The output is sorted alphabetically.

SEE ALSO
ar(1), ar(5), a.out(5), stab(5)