Annotation of src/usr.bin/nm/nm.1, Revision 1.7
1.7 ! espie 1: .\" $OpenBSD: nm.1,v 1.6 2000/11/09 17:52:28 aaron 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
1.4 aaron 39: .Os
1.1 deraadt 40: .Sh NAME
41: .Nm nm
42: .Nd display name list (symbol table)
43: .Sh SYNOPSIS
44: .Nm nm
45: .Op Fl agnopruw
1.3 aaron 46: .Ar file Op Ar ...
1.1 deraadt 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,
1.4 aaron 52: .Nm
1.1 deraadt 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
1.5 aaron 61: and displays its symbol table if it exists.
62: .Pp
63: The options are as follows:
1.6 aaron 64: .Bl -tag -width Ds
1.1 deraadt 65: .It Fl a
66: Display symbol table entries inserted for use by debuggers.
1.7 ! espie 67: .It Fl C
! 68: Decode low-level symbol names. This involves removing extra underscores
! 69: and making C++ function names readable.
1.1 deraadt 70: .It Fl g
71: Restrict display to external (global) symbols.
72: .It Fl n
73: Present results in numerical order.
74: .It Fl o
75: Display full path or library name of object on every line.
76: .It Fl p
77: Do not sort at all.
78: .It Fl r
79: Reverse order sort.
80: .It Fl u
81: Display undefined symbols only.
82: .It Fl w
83: Warn about non-object archive members.
1.3 aaron 84: Normally,
85: .Nm nm
86: will silently ignore all archive members which are not
1.1 deraadt 87: object files.
88: .El
89: .Pp
90: Each symbol name is preceded by its value (a blank field if the symbol
91: is undefined) and one of the following letters:
92: .Pp
93: .Bl -tag -width Ds -compact -offset indent
94: .It Fl
95: debugger symbol table entries (see the
96: .Fl a
97: option).
98: .It Li A
99: absolute
100: .It Li B
101: bss segment symbol
102: .It Li C
103: common symbol
104: .It Li D
105: data segment symbol
106: .It Li f
107: file name
108: .It Li T
109: text segment symbol
110: .It Li U
111: undefined
112: .El
113: .Pp
114: If the symbol is local (non-external) the type letter is in lower case.
115: The output is sorted alphabetically.
116: .Sh SEE ALSO
117: .Xr ar 1 ,
1.3 aaron 118: .Xr a.out 5 ,
1.1 deraadt 119: .Xr ar 5 ,
120: .Xr stab 5
121: .Sh HISTORY
122: An
123: .Nm nm
124: command appeared in
125: .At v6 .