Commit | Line | Data |
---|---|---|
b5dc1377 CL |
1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
a689557b | 3 | .\" |
b5dc1377 | 4 | .\" %sccs.include.redist.man% |
a689557b | 5 | .\" |
54351d0d | 6 | .\" @(#)nm.1 6.7 (Berkeley) %G% |
b5dc1377 CL |
7 | .\" |
8 | .Dd | |
9 | .Dt NM 1 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm nm | |
13 | .Nd display name list (symbol table) | |
14 | .Sh SYNOPSIS | |
15 | .Nm nm | |
16 | .Op Fl agnopruw | |
17 | .Ar | |
18 | .Sh DESCRIPTION | |
19 | The symbol table (name list) of each object in | |
20 | .Ar file(s) | |
21 | is displayed. | |
22 | If a library (archive) is given, | |
23 | .Nm | |
24 | displays a list for each | |
25 | object archive member. | |
26 | If | |
27 | .Ar file | |
28 | is not present, | |
29 | .Nm | |
30 | searches for the file | |
31 | .Pa a.out | |
32 | and if present, displays the symbol | |
33 | table for | |
34 | .Pa a.out . | |
54351d0d | 35 | .Bl -tag -width flag |
1e94aeb2 | 36 | .It Fl a |
b5dc1377 | 37 | Display symbol table entries inserted for use by debuggers. |
1e94aeb2 | 38 | .It Fl g |
b5dc1377 | 39 | Restrict display to external (global) symbols. |
1e94aeb2 | 40 | .It Fl n |
b5dc1377 | 41 | Present results in numerical order. |
1e94aeb2 | 42 | .It Fl o |
b5dc1377 | 43 | Display full path or library name of object on every line. |
1e94aeb2 | 44 | .It Fl p |
b5dc1377 | 45 | Do not sort at all. |
1e94aeb2 | 46 | .It Fl r |
b5dc1377 | 47 | Reverse order sort. |
1e94aeb2 | 48 | .It Fl u |
b5dc1377 | 49 | Display undefined symbols only. |
1e94aeb2 | 50 | .It Fl w |
6820c751 KB |
51 | Warn about non-object archive members. |
52 | Normally, nm will silently ignore all archive members which are not | |
53 | object files. | |
1e94aeb2 | 54 | .El |
b5dc1377 | 55 | .Pp |
6820c751 KB |
56 | Each symbol name is preceded by its value (a blank field if the symbol |
57 | is undefined) and one of the following letters: | |
54351d0d CL |
58 | .Pp |
59 | .Bl -tag -width Ds -compact -offset indent | |
1e94aeb2 | 60 | .It Fl |
6820c751 | 61 | debugger symbol table entries (see the |
b5dc1377 | 62 | .Fl a |
6820c751 | 63 | option). |
1e94aeb2 | 64 | .It Li A |
6820c751 | 65 | absolute |
1e94aeb2 | 66 | .It Li B |
6820c751 | 67 | bss segment symbol |
1e94aeb2 | 68 | .It Li C |
6820c751 | 69 | common symbol |
1e94aeb2 | 70 | .It Li D |
6820c751 | 71 | data segment symbol |
1e94aeb2 | 72 | .It Li f |
6820c751 | 73 | file name |
1e94aeb2 | 74 | .It Li T |
6820c751 | 75 | text segment symbol |
1e94aeb2 | 76 | .It Li U |
6820c751 | 77 | undefined |
1e94aeb2 | 78 | .El |
b5dc1377 | 79 | .Pp |
6820c751 KB |
80 | If the symbol is local (non-external) the type letter is in lower case. |
81 | The output is sorted alphabetically. | |
b5dc1377 CL |
82 | .Sh SEE ALSO |
83 | .Xr ar 1 , | |
84 | .Xr ar 5 , | |
85 | .Xr a.out 5 , | |
86 | .Xr stab 5 | |
87 | .Sh HISTORY | |
1e94aeb2 CL |
88 | An |
89 | .Nm nm | |
90 | command appeared in | |
91 | .At v6 . |