]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-nm/llvm-nm.1
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / usr.bin / clang / llvm-nm / llvm-nm.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "LLVM-NM" "1" "2018-08-02" "7" "LLVM"
5 .SH NAME
6 llvm-nm \- list LLVM bitcode and object file's symbol table
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
33 ..
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-nm\fP [\fIoptions\fP] [\fIfilenames...\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllvm\-nm\fP utility lists the names of symbols from the LLVM bitcode
40 files, object files, or \fBar\fP archives containing them, named on the
41 command line.  Each symbol is listed along with some simple information about
42 its provenance.  If no file name is specified, or \fI\-\fP is used as a file name,
43 \fBllvm\-nm\fP will process a file on its standard input stream.
44 .sp
45 \fBllvm\-nm\fP\(aqs default output format is the traditional BSD \fBnm\fP
46 output format.  Each such output record consists of an (optional) 8\-digit
47 hexadecimal address, followed by a type code character, followed by a name, for
48 each symbol.  One record is printed per line; fields are separated by spaces.
49 When the address is omitted, it is replaced by 8 spaces.
50 .sp
51 Type code characters currently supported, and their meanings, are as follows:
52 .sp
53 U
54 .INDENT 0.0
55 .INDENT 3.5
56 Named object is referenced but undefined in this bitcode file
57 .UNINDENT
58 .UNINDENT
59 .sp
60 C
61 .INDENT 0.0
62 .INDENT 3.5
63 Common (multiple definitions link together into one def)
64 .UNINDENT
65 .UNINDENT
66 .sp
67 W
68 .INDENT 0.0
69 .INDENT 3.5
70 Weak reference (multiple definitions link together into zero or one definitions)
71 .UNINDENT
72 .UNINDENT
73 .sp
74 t
75 .INDENT 0.0
76 .INDENT 3.5
77 Local function (text) object
78 .UNINDENT
79 .UNINDENT
80 .sp
81 T
82 .INDENT 0.0
83 .INDENT 3.5
84 Global function (text) object
85 .UNINDENT
86 .UNINDENT
87 .sp
88 d
89 .INDENT 0.0
90 .INDENT 3.5
91 Local data object
92 .UNINDENT
93 .UNINDENT
94 .sp
95 D
96 .INDENT 0.0
97 .INDENT 3.5
98 Global data object
99 .UNINDENT
100 .UNINDENT
101 .sp
102 ?
103 .INDENT 0.0
104 .INDENT 3.5
105 Something unrecognizable
106 .UNINDENT
107 .UNINDENT
108 .sp
109 Because LLVM bitcode files typically contain objects that are not considered to
110 have addresses until they are linked into an executable image or dynamically
111 compiled "just\-in\-time", \fBllvm\-nm\fP does not print an address for any
112 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
113 file.
114 .SH OPTIONS
115 .INDENT 0.0
116 .TP
117 .B \-B    (default)
118 Use BSD output format.  Alias for \fI\-\-format=bsd\fP\&.
119 .UNINDENT
120 .INDENT 0.0
121 .TP
122 .B \-P
123 Use POSIX.2 output format.  Alias for \fI\-\-format=posix\fP\&.
124 .UNINDENT
125 .INDENT 0.0
126 .TP
127 .B \-\-debug\-syms, \-a
128 Show all symbols, even debugger only.
129 .UNINDENT
130 .INDENT 0.0
131 .TP
132 .B \-\-defined\-only
133 Print only symbols defined in this file (as opposed to
134 symbols which may be referenced by objects in this file, but not
135 defined in this file.)
136 .UNINDENT
137 .INDENT 0.0
138 .TP
139 .B \-\-dynamic, \-D
140 Display dynamic symbols instead of normal symbols.
141 .UNINDENT
142 .INDENT 0.0
143 .TP
144 .B \-\-extern\-only, \-g
145 Print only symbols whose definitions are external; that is, accessible
146 from other files.
147 .UNINDENT
148 .INDENT 0.0
149 .TP
150 .B \-\-no\-weak, \-W
151 Don\(aqt print any weak symbols in the output.
152 .UNINDENT
153 .INDENT 0.0
154 .TP
155 .B \-\-format=format, \-f format
156 Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, or \fIbsd\fP\&.  The default
157 is \fIbsd\fP\&.
158 .UNINDENT
159 .INDENT 0.0
160 .TP
161 .B \-help
162 Print a summary of command\-line options and their meanings.
163 .UNINDENT
164 .INDENT 0.0
165 .TP
166 .B \-\-no\-sort, \-p
167 Shows symbols in order encountered.
168 .UNINDENT
169 .INDENT 0.0
170 .TP
171 .B \-\-numeric\-sort, \-n, \-v
172 Sort symbols by address.
173 .UNINDENT
174 .INDENT 0.0
175 .TP
176 .B \-\-print\-file\-name, \-A, \-o
177 Precede each symbol with the file it came from.
178 .UNINDENT
179 .INDENT 0.0
180 .TP
181 .B \-\-print\-size, \-S
182 Show symbol size instead of address.
183 .UNINDENT
184 .INDENT 0.0
185 .TP
186 .B \-\-size\-sort
187 Sort symbols by size.
188 .UNINDENT
189 .INDENT 0.0
190 .TP
191 .B \-\-undefined\-only, \-u
192 Print only symbols referenced but not defined in this file.
193 .UNINDENT
194 .INDENT 0.0
195 .TP
196 .B \-\-radix=RADIX, \-t
197 Specify the radix of the symbol address(es). Values accepted d(decimal),
198 x(hexadecomal) and o(octal).
199 .UNINDENT
200 .SH BUGS
201 .INDENT 0.0
202 .INDENT 3.5
203 .INDENT 0.0
204 .IP \(bu 2
205 \fBllvm\-nm\fP does not support the full set of arguments that GNU
206 \fBnm\fP does.
207 .UNINDENT
208 .UNINDENT
209 .UNINDENT
210 .SH EXIT STATUS
211 .sp
212 \fBllvm\-nm\fP exits with an exit code of zero.
213 .SH SEE ALSO
214 .sp
215 llvm\-dis, ar(1), nm(1)
216 .SH AUTHOR
217 Maintained by The LLVM Team (http://llvm.org/).
218 .SH COPYRIGHT
219 2003-2018, LLVM Project
220 .\" Generated by docutils manpage writer.
221 .