Annotation of src/usr.bin/nm/nm.1, Revision 1.11
1.11 ! espie 1: .\" $OpenBSD: nm.1,v 1.10 2001/06/23 21:54:51 fgsch 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
1.11 ! espie 45: .Op Fl aCegnopruw
1.8 smart 46: .Op Ar file ...
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.11 ! espie 70: .It Fl e
! 71: Output extended information, that is `w' for weak symbols, `f' for
! 72: function-like symbols, and `o' for object-like symbols.
1.1 deraadt 73: .It Fl g
74: Restrict display to external (global) symbols.
75: .It Fl n
76: Present results in numerical order.
77: .It Fl o
78: Display full path or library name of object on every line.
79: .It Fl p
80: Do not sort at all.
81: .It Fl r
82: Reverse order sort.
83: .It Fl u
84: Display undefined symbols only.
85: .It Fl w
86: Warn about non-object archive members.
1.3 aaron 87: Normally,
88: .Nm nm
89: will silently ignore all archive members which are not
1.1 deraadt 90: object files.
91: .El
92: .Pp
93: Each symbol name is preceded by its value (a blank field if the symbol
94: is undefined) and one of the following letters:
95: .Pp
96: .Bl -tag -width Ds -compact -offset indent
97: .It Fl
98: debugger symbol table entries (see the
99: .Fl a
100: option).
101: .It Li A
102: absolute
103: .It Li B
104: bss segment symbol
105: .It Li C
106: common symbol
107: .It Li D
108: data segment symbol
1.10 fgsch 109: .It Li I
110: indirect reference (alias to other symbol)
1.1 deraadt 111: .It Li f
112: file name
113: .It Li T
114: text segment symbol
115: .It Li U
116: undefined
117: .El
118: .Pp
119: If the symbol is local (non-external) the type letter is in lower case.
120: The output is sorted alphabetically.
121: .Sh SEE ALSO
122: .Xr ar 1 ,
1.3 aaron 123: .Xr a.out 5 ,
1.1 deraadt 124: .Xr ar 5 ,
125: .Xr stab 5
126: .Sh HISTORY
127: An
128: .Nm nm
129: command appeared in
130: .At v6 .