date and time created 88/12/14 16:21:45 by marc
[unix-history] / usr / src / usr.bin / nm / nm.1
CommitLineData
a689557b
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
aa652bde 5.\" @(#)nm.1 6.1 (Berkeley) %G%
a689557b 6.\"
aa652bde 7.TH NM 1 ""
a689557b
KM
8.UC 4
9.SH NAME
10nm \- print name list
11.SH SYNOPSIS
12.B nm
13[
aa652bde 14.B \-agnopru
a689557b
KM
15]
16[ file ... ]
17.SH DESCRIPTION
18.I Nm
19prints the name list (symbol table) of each object
20.I file
7104227d
KM
21in the argument list. If an argument is an archive, a listing for each object
22file in the archive will be produced. If no
a689557b 23.I file
7104227d 24is given, the symbols in "a.out" are listed.
a689557b
KM
25.PP
26Each symbol name is preceded by its value (blanks if undefined)
27and one of the letters
28.SM
29.B U
30(undefined),
31.SM
32.B A
33(absolute),
34.SM
35.B T
36(text segment symbol),
37.SM
38.B D
39(data segment symbol),
40.SM
41.B B
42(bss segment symbol),
43.SM
44.B C
45(common symbol),
46.SM
47.B f
48file name,
49or
50.B \-
aa652bde 51for debugger symbol table entries (see
a689557b
KM
52.B \-a
53below).
7104227d 54If the symbol is local (non-external) the type letter is in lower case.
a689557b
KM
55The output is sorted alphabetically.
56.PP
57Options are:
58.TP
aa652bde
KM
59.B \-a
60Print symbol table entries inserted for use by debuggers.
61.TP
a689557b
KM
62.B \-g
63Print only global (external) symbols.
64.TP
65.B \-n
66Sort numerically rather than alphabetically.
67.TP
68.B \-o
7104227d 69Prepend file or archive element name to each output line rather than only once.
a689557b
KM
70.TP
71.B \-p
72Don't sort; print in symbol-table order.
73.TP
74.B \-r
75Sort in reverse order.
76.TP
77.B \-u
78Print only undefined symbols.
79.SH SEE ALSO
80ar(1), ar(5), a.out(5), stab(5)