]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-nm/llvm-nm.1
Regenerate ReStructuredText based manpages for llvm-project tools:
[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" "2020-06-26" "10" "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 LLVM bitcode
40 files, object files, and archives. Each symbol is listed along with some simple
41 information about its provenance. If no filename is specified, \fIa.out\fP is used
42 as the input. If \fI\-\fP is used as a filename, \fBllvm\-nm\fP will read a file
43 from 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 The supported type code characters are as follows. Where both lower and
52 upper\-case characters are listed for the same meaning, a lower\-case character
53 represents a local symbol, whilst an upper\-case character represents a global
54 (external) symbol:
55 .sp
56 a, A
57 .INDENT 0.0
58 .INDENT 3.5
59 Absolute symbol.
60 .UNINDENT
61 .UNINDENT
62 .sp
63 b, B
64 .INDENT 0.0
65 .INDENT 3.5
66 Uninitialized data (bss) object.
67 .UNINDENT
68 .UNINDENT
69 .sp
70 C
71 .INDENT 0.0
72 .INDENT 3.5
73 Common symbol. Multiple definitions link together into one definition.
74 .UNINDENT
75 .UNINDENT
76 .sp
77 d, D
78 .INDENT 0.0
79 .INDENT 3.5
80 Writable data object.
81 .UNINDENT
82 .UNINDENT
83 .sp
84 i, I
85 .INDENT 0.0
86 .INDENT 3.5
87 COFF: .idata symbol or symbol in a section with IMAGE_SCN_LNK_INFO set.
88 .UNINDENT
89 .UNINDENT
90 .sp
91 n
92 .INDENT 0.0
93 .INDENT 3.5
94 ELF: local symbol from non\-alloc section.
95 .sp
96 COFF: debug symbol.
97 .UNINDENT
98 .UNINDENT
99 .sp
100 N
101 .INDENT 0.0
102 .INDENT 3.5
103 ELF: debug section symbol, or global symbol from non\-alloc section.
104 .UNINDENT
105 .UNINDENT
106 .sp
107 s, S
108 .INDENT 0.0
109 .INDENT 3.5
110 COFF: section symbol.
111 .sp
112 Mach\-O: absolute symbol or symbol from a section other than __TEXT_EXEC __text,
113 __TEXT __text, __DATA __data, or __DATA __bss.
114 .UNINDENT
115 .UNINDENT
116 .sp
117 r, R
118 .INDENT 0.0
119 .INDENT 3.5
120 Read\-only data object.
121 .UNINDENT
122 .UNINDENT
123 .sp
124 t, T
125 .INDENT 0.0
126 .INDENT 3.5
127 Code (text) object.
128 .UNINDENT
129 .UNINDENT
130 .sp
131 u
132 .INDENT 0.0
133 .INDENT 3.5
134 ELF: GNU unique symbol.
135 .UNINDENT
136 .UNINDENT
137 .sp
138 U
139 .INDENT 0.0
140 .INDENT 3.5
141 Named object is undefined in this file.
142 .UNINDENT
143 .UNINDENT
144 .sp
145 v
146 .INDENT 0.0
147 .INDENT 3.5
148 ELF: Undefined weak object. It is not a link failure if the object is not
149 defined.
150 .UNINDENT
151 .UNINDENT
152 .sp
153 V
154 .INDENT 0.0
155 .INDENT 3.5
156 ELF: Defined weak object symbol. This definition will only be used if no
157 regular definitions exist in a link. If multiple weak definitions and no
158 regular definitions exist, one of the weak definitions will be used.
159 .UNINDENT
160 .UNINDENT
161 .sp
162 w
163 .INDENT 0.0
164 .INDENT 3.5
165 Undefined weak symbol other than an ELF object symbol. It is not a link failure
166 if the symbol is not defined.
167 .UNINDENT
168 .UNINDENT
169 .sp
170 W
171 .INDENT 0.0
172 .INDENT 3.5
173 Defined weak symbol other than an ELF object symbol. This definition will only
174 be used if no regular definitions exist in a link. If multiple weak definitions
175 and no regular definitions exist, one of the weak definitions will be used.
176 .UNINDENT
177 .UNINDENT
178 .sp
179 \-
180 .INDENT 0.0
181 .INDENT 3.5
182 Mach\-O: N_STAB symbol.
183 .UNINDENT
184 .UNINDENT
185 .sp
186 ?
187 .INDENT 0.0
188 .INDENT 3.5
189 Something unrecognizable.
190 .UNINDENT
191 .UNINDENT
192 .sp
193 Because LLVM bitcode files typically contain objects that are not considered to
194 have addresses until they are linked into an executable image or dynamically
195 compiled "just\-in\-time", \fBllvm\-nm\fP does not print an address for any
196 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
197 file.
198 .SH OPTIONS
199 .INDENT 0.0
200 .TP
201 .B \-B
202 Use BSD output format. Alias for \fB\-\-format=bsd\fP\&.
203 .UNINDENT
204 .INDENT 0.0
205 .TP
206 .B \-\-debug\-syms, \-a
207 Show all symbols, even those usually suppressed.
208 .UNINDENT
209 .INDENT 0.0
210 .TP
211 .B \-\-defined\-only, \-U
212 Print only symbols defined in this file.
213 .UNINDENT
214 .INDENT 0.0
215 .TP
216 .B \-\-demangle, \-C
217 Demangle symbol names.
218 .UNINDENT
219 .INDENT 0.0
220 .TP
221 .B \-\-dynamic, \-D
222 Display dynamic symbols instead of normal symbols.
223 .UNINDENT
224 .INDENT 0.0
225 .TP
226 .B \-\-extern\-only, \-g
227 Print only symbols whose definitions are external; that is, accessible from
228 other files.
229 .UNINDENT
230 .INDENT 0.0
231 .TP
232 .B \-\-format=<format>, \-f
233 Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, \fIdarwin\fP, or \fIbsd\fP\&.
234 The default is \fIbsd\fP\&.
235 .UNINDENT
236 .INDENT 0.0
237 .TP
238 .B \-\-help, \-h
239 Print a summary of command\-line options and their meanings.
240 .UNINDENT
241 .INDENT 0.0
242 .TP
243 .B \-\-help\-list
244 Print an uncategorized summary of command\-line options and their meanings.
245 .UNINDENT
246 .INDENT 0.0
247 .TP
248 .B \-\-just\-symbol\-name, \-j
249 Print just the symbol names.
250 .UNINDENT
251 .INDENT 0.0
252 .TP
253 .B \-m
254 Use Darwin format. Alias for \fB\-\-format=darwin\fP\&.
255 .UNINDENT
256 .INDENT 0.0
257 .TP
258 .B \-\-no\-demangle
259 Don\(aqt demangle symbol names. This is the default.
260 .UNINDENT
261 .INDENT 0.0
262 .TP
263 .B \-\-no\-llvm\-bc
264 Disable the LLVM bitcode reader.
265 .UNINDENT
266 .INDENT 0.0
267 .TP
268 .B \-\-no\-sort, \-p
269 Show symbols in the order encountered.
270 .UNINDENT
271 .INDENT 0.0
272 .TP
273 .B \-\-no\-weak, \-W
274 Don\(aqt print weak symbols.
275 .UNINDENT
276 .INDENT 0.0
277 .TP
278 .B \-\-numeric\-sort, \-n, \-v
279 Sort symbols by address.
280 .UNINDENT
281 .INDENT 0.0
282 .TP
283 .B \-\-portability, \-P
284 Use POSIX.2 output format.  Alias for \fB\-\-format=posix\fP\&.
285 .UNINDENT
286 .INDENT 0.0
287 .TP
288 .B \-\-print\-armap, \-M
289 Print the archive symbol table, in addition to the symbols.
290 .UNINDENT
291 .INDENT 0.0
292 .TP
293 .B \-\-print\-file\-name, \-A, \-o
294 Precede each symbol with the file it came from.
295 .UNINDENT
296 .INDENT 0.0
297 .TP
298 .B \-\-print\-size, \-S
299 Show symbol size as well as address (not applicable for Mach\-O).
300 .UNINDENT
301 .INDENT 0.0
302 .TP
303 .B \-\-radix=<RADIX>, \-t
304 Specify the radix of the symbol address(es). Values accepted are \fId\fP (decimal),
305 \fIx\fP (hexadecimal) and \fIo\fP (octal).
306 .UNINDENT
307 .INDENT 0.0
308 .TP
309 .B \-\-reverse\-sort, \-r
310 Sort symbols in reverse order.
311 .UNINDENT
312 .INDENT 0.0
313 .TP
314 .B \-\-size\-sort
315 Sort symbols by size.
316 .UNINDENT
317 .INDENT 0.0
318 .TP
319 .B \-\-special\-syms
320 Ignored. For GNU compatibility only.
321 .UNINDENT
322 .INDENT 0.0
323 .TP
324 .B \-\-undefined\-only, \-u
325 Print only undefined symbols.
326 .UNINDENT
327 .INDENT 0.0
328 .TP
329 .B \-\-version
330 Display the version of the \fBllvm\-nm\fP executable. Does not stack with
331 other commands.
332 .UNINDENT
333 .INDENT 0.0
334 .TP
335 .B \-\-without\-aliases
336 Exclude aliases from the output.
337 .UNINDENT
338 .INDENT 0.0
339 .TP
340 .B @<FILE>
341 Read command\-line options from response file \fI<FILE>\fP\&.
342 .UNINDENT
343 .SH MACH-O SPECIFIC OPTIONS
344 .INDENT 0.0
345 .TP
346 .B \-\-add\-dyldinfo
347 Add symbols from the dyldinfo, if they are not already in the symbol table.
348 This is the default.
349 .UNINDENT
350 .INDENT 0.0
351 .TP
352 .B \-\-arch=<arch1[,arch2,...]>
353 Dump the symbols from the specified architecture(s).
354 .UNINDENT
355 .INDENT 0.0
356 .TP
357 .B \-\-dyldinfo\-only
358 Dump only symbols from the dyldinfo.
359 .UNINDENT
360 .INDENT 0.0
361 .TP
362 .B \-\-no\-dyldinfo
363 Do not add any symbols from the dyldinfo.
364 .UNINDENT
365 .INDENT 0.0
366 .TP
367 .B \-s=<segment section>
368 Dump only symbols from this segment and section name.
369 .UNINDENT
370 .INDENT 0.0
371 .TP
372 .B \-x
373 Print symbol entry in hex.
374 .UNINDENT
375 .SH BUGS
376 .INDENT 0.0
377 .INDENT 3.5
378 .INDENT 0.0
379 .IP \(bu 2
380 \fBllvm\-nm\fP does not support the full set of arguments that GNU
381 \fBnm\fP does.
382 .UNINDENT
383 .UNINDENT
384 .UNINDENT
385 .SH EXIT STATUS
386 .sp
387 \fBllvm\-nm\fP exits with an exit code of zero.
388 .SH SEE ALSO
389 .sp
390 \fBllvm\-ar(1)\fP, \fBllvm\-objdump(1)\fP, \fBllvm\-readelf(1)\fP,
391 \fBllvm\-readobj(1)\fP
392 .SH AUTHOR
393 Maintained by the LLVM Team (https://llvm.org/).
394 .SH COPYRIGHT
395 2003-2020, LLVM Project
396 .\" Generated by docutils manpage writer.
397 .