manual page distributed with 4.2BSD
[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.\"
7104227d 5.\" @(#)nm.1 5.1 (Berkeley) %G%
a689557b 6.\"
7104227d 7.TH NM 1 "7 February 1983"
a689557b
KM
8.UC 4
9.SH NAME
10nm \- print name list
11.SH SYNOPSIS
12.B nm
13[
7104227d 14.B \-gnopru
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 \-
51for sdb symbol table entries (see
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
a689557b
KM
59.B \-g
60Print only global (external) symbols.
61.TP
62.B \-n
63Sort numerically rather than alphabetically.
64.TP
65.B \-o
7104227d 66Prepend file or archive element name to each output line rather than only once.
a689557b
KM
67.TP
68.B \-p
69Don't sort; print in symbol-table order.
70.TP
71.B \-r
72Sort in reverse order.
73.TP
74.B \-u
75Print only undefined symbols.
76.SH SEE ALSO
77ar(1), ar(5), a.out(5), stab(5)