Annotation of src/usr.bin/nm/nm.1, Revision 1.2
1.2 ! deraadt 1: .\" $OpenBSD: nm.1,v 1.3 1995/08/31 23:41:58 jtc Exp $
1.1 deraadt 2: .\" $NetBSD: nm.1,v 1.3 1995/08/31 23:41:58 jtc Exp $
3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)nm.1 8.1 (Berkeley) 6/6/93
36: .\"
37: .Dd June 6, 1993
38: .Dt NM 1
39: .Os BSD 4
40: .Sh NAME
41: .Nm nm
42: .Nd display name list (symbol table)
43: .Sh SYNOPSIS
44: .Nm nm
45: .Op Fl agnopruw
46: .Ar
47: .Sh DESCRIPTION
48: The symbol table (name list) of each object in
49: .Ar file(s)
50: is displayed.
51: If a library (archive) is given,
52: .Nm
53: displays a list for each
54: object archive member.
55: If
56: .Ar file
57: is not present,
58: .Nm
59: searches for the file
60: .Pa a.out
61: and if present, displays the symbol
62: table for
63: .Pa a.out .
64: .Bl -tag -width flag
65: .It Fl a
66: Display symbol table entries inserted for use by debuggers.
67: .It Fl g
68: Restrict display to external (global) symbols.
69: .It Fl n
70: Present results in numerical order.
71: .It Fl o
72: Display full path or library name of object on every line.
73: .It Fl p
74: Do not sort at all.
75: .It Fl r
76: Reverse order sort.
77: .It Fl u
78: Display undefined symbols only.
79: .It Fl w
80: Warn about non-object archive members.
81: Normally, nm will silently ignore all archive members which are not
82: object files.
83: .El
84: .Pp
85: Each symbol name is preceded by its value (a blank field if the symbol
86: is undefined) and one of the following letters:
87: .Pp
88: .Bl -tag -width Ds -compact -offset indent
89: .It Fl
90: debugger symbol table entries (see the
91: .Fl a
92: option).
93: .It Li A
94: absolute
95: .It Li B
96: bss segment symbol
97: .It Li C
98: common symbol
99: .It Li D
100: data segment symbol
101: .It Li f
102: file name
103: .It Li T
104: text segment symbol
105: .It Li U
106: undefined
107: .El
108: .Pp
109: If the symbol is local (non-external) the type letter is in lower case.
110: The output is sorted alphabetically.
111: .Sh SEE ALSO
112: .Xr ar 1 ,
113: .Xr ar 5 ,
114: .Xr a.out 5 ,
115: .Xr stab 5
116: .Sh HISTORY
117: An
118: .Nm nm
119: command appeared in
120: .At v6 .