Annotation of src/usr.bin/nm/nm.1, Revision 1.5
1.5 ! aaron 1: .\" $OpenBSD: nm.1,v 1.4 1999/06/05 01:21:35 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.1 deraadt 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.
1.3 aaron 81: Normally,
82: .Nm nm
83: will silently ignore all archive members which are not
1.1 deraadt 84: object files.
85: .El
86: .Pp
87: Each symbol name is preceded by its value (a blank field if the symbol
88: is undefined) and one of the following letters:
89: .Pp
90: .Bl -tag -width Ds -compact -offset indent
91: .It Fl
92: debugger symbol table entries (see the
93: .Fl a
94: option).
95: .It Li A
96: absolute
97: .It Li B
98: bss segment symbol
99: .It Li C
100: common symbol
101: .It Li D
102: data segment symbol
103: .It Li f
104: file name
105: .It Li T
106: text segment symbol
107: .It Li U
108: undefined
109: .El
110: .Pp
111: If the symbol is local (non-external) the type letter is in lower case.
112: The output is sorted alphabetically.
113: .Sh SEE ALSO
114: .Xr ar 1 ,
1.3 aaron 115: .Xr a.out 5 ,
1.1 deraadt 116: .Xr ar 5 ,
117: .Xr stab 5
118: .Sh HISTORY
119: An
120: .Nm nm
121: command appeared in
122: .At v6 .