]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/nm
secstore(1): add DIAGNOSTICS section
[plan9front.git] / sys / man / 1 / nm
1 .TH NM 1
2 .SH NAME
3 nm \- name list (symbol table)
4 .SH SYNOPSIS
5 .B nm
6 [
7 .B -aghnsTu
8 ]
9 .I file ...
10 .SH DESCRIPTION
11 .I Nm
12 prints the name list of each executable or object
13 .I file
14 in the argument list.
15 If the
16 .I file
17 is an archive
18 (see
19 .IR ar (1)),
20 the name list of each file in the archive is printed.
21 If more than one file is given in the argument list,
22 the name of each file is printed at the beginning of each line.
23 .PP
24 Each symbol name is preceded by its hexadecimal
25 value (blanks if undefined)
26 and one of the letters
27 .TP
28 .B U
29 undefined symbol
30 .PD0
31 .TP
32 .B T
33 text segment symbol
34 .TP
35 .B t
36 static text segment symbol
37 .TP
38 .B L
39 leaf function text segment symbol
40 .TP
41 .B l
42 static leaf function text segment symbol
43 .TP
44 .B D
45 data segment symbol
46 .TP
47 .B d
48 static data segment symbol
49 .TP
50 .B B
51 bss segment symbol
52 .TP
53 .B b
54 static bss segment symbol
55 .TP
56 .B a
57 automatic (local) variable symbol
58 .TP
59 .B p
60 function parameter symbol
61 .TP
62 .B z
63 source file name
64 .TP
65 .B Z
66 source file line offset
67 .TP
68 .B f
69 source file name components
70 .PD
71 .PP
72 The output is sorted alphabetically.
73 .PP
74 Options are:
75 .TP
76 .B -a
77 Print all symbols; normally only user-defined text, data,
78 and bss segment symbols are printed.
79 .TP
80 .B -g
81 Print only global
82 .RB ( T ,
83 .BR L ,
84 .BR D ,
85 .BR B )
86 symbols.
87 .TP
88 .B -h
89 Do not print file name headers with output lines.
90 .TP
91 .B -n
92 Sort according to the address of the symbols.
93 .TP
94 .B -s
95 Don't sort; print in symbol-table order.
96 .TP
97 .B -T
98 Prefix each line with the symbol's type signature.
99 .TP
100 .B -u
101 Print only undefined symbols.
102 .SH SOURCE
103 .B /sys/src/cmd/nm.c
104 .SH SEE ALSO
105 .IR ar (1),
106 .IR 2l (1), 
107 .IR db (1),
108 .IR acid (1),
109 .IR a.out (6)
110