]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-objdump/llvm-objdump.1
contrib/tzdata: import tzdata 2021d
[FreeBSD/FreeBSD.git] / usr.bin / clang / llvm-objdump / llvm-objdump.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .TH "LLVM-OBJDUMP" "1" "2021-06-07" "12" "LLVM"
32 .SH NAME
33 llvm-objdump \- LLVM's object file dumper
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-objdump\fP [\fIcommands\fP] [\fIoptions\fP] [\fIfilenames...\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllvm\-objdump\fP utility prints the contents of object files and
40 final linked images named on the command line. If no file name is specified,
41 \fBllvm\-objdump\fP will attempt to read from \fIa.out\fP\&. If \fI\-\fP is used as a
42 file name, \fBllvm\-objdump\fP will process a file on its standard input
43 stream.
44 .SH COMMANDS
45 .sp
46 At least one of the following commands are required, and some commands can be
47 combined with other commands:
48 .INDENT 0.0
49 .TP
50 .B \-a, \-\-archive\-headers
51 Display the information contained within an archive\(aqs headers.
52 .UNINDENT
53 .INDENT 0.0
54 .TP
55 .B \-d, \-\-disassemble
56 Disassemble all text sections found in the input files.
57 .UNINDENT
58 .INDENT 0.0
59 .TP
60 .B \-D, \-\-disassemble\-all
61 Disassemble all sections found in the input files.
62 .UNINDENT
63 .INDENT 0.0
64 .TP
65 .B \-\-disassemble\-symbols=<symbol1[,symbol2,...]>
66 Disassemble only the specified symbols. Takes demangled symbol names when
67 \fI\%\-\-demangle\fP is specified, otherwise takes mangled symbol names.
68 Implies \fI\%\-\-disassemble\fP\&.
69 .UNINDENT
70 .INDENT 0.0
71 .TP
72 .B \-\-dwarf=<value>
73 Dump the specified DWARF debug sections. The supported values are:
74 .sp
75 \fIframes\fP \- .debug_frame
76 .UNINDENT
77 .INDENT 0.0
78 .TP
79 .B \-f, \-\-file\-headers
80 Display the contents of the overall file header.
81 .UNINDENT
82 .INDENT 0.0
83 .TP
84 .B \-\-fault\-map\-section
85 Display the content of the fault map section.
86 .UNINDENT
87 .INDENT 0.0
88 .TP
89 .B \-h, \-\-headers, \-\-section\-headers
90 Display summaries of the headers for each section.
91 .UNINDENT
92 .INDENT 0.0
93 .TP
94 .B \-\-help
95 Display usage information and exit. Does not stack with other commands.
96 .UNINDENT
97 .INDENT 0.0
98 .TP
99 .B \-p, \-\-private\-headers
100 Display format\-specific file headers.
101 .UNINDENT
102 .INDENT 0.0
103 .TP
104 .B \-r, \-\-reloc
105 Display the relocation entries in the file.
106 .UNINDENT
107 .INDENT 0.0
108 .TP
109 .B \-R, \-\-dynamic\-reloc
110 Display the dynamic relocation entries in the file.
111 .UNINDENT
112 .INDENT 0.0
113 .TP
114 .B \-\-raw\-clang\-ast
115 Dump the raw binary contents of the clang AST section.
116 .UNINDENT
117 .INDENT 0.0
118 .TP
119 .B \-s, \-\-full\-contents
120 Display the contents of each section.
121 .UNINDENT
122 .INDENT 0.0
123 .TP
124 .B \-t, \-\-syms
125 Display the symbol table.
126 .UNINDENT
127 .INDENT 0.0
128 .TP
129 .B \-T, \-\-dynamic\-syms
130 Display the contents of the dynamic symbol table.
131 .UNINDENT
132 .INDENT 0.0
133 .TP
134 .B \-u, \-\-unwind\-info
135 Display the unwind info of the input(s).
136 .UNINDENT
137 .INDENT 0.0
138 .TP
139 .B \-\-version
140 Display the version of the \fBllvm\-objdump\fP executable. Does not stack
141 with other commands.
142 .UNINDENT
143 .INDENT 0.0
144 .TP
145 .B \-x, \-\-all\-headers
146 Display all available header information. Equivalent to specifying
147 \fI\%\-\-archive\-headers\fP, \fI\%\-\-file\-headers\fP,
148 \fI\%\-\-private\-headers\fP, \fI\%\-\-reloc\fP, \fI\%\-\-section\-headers\fP,
149 and \fI\%\-\-syms\fP\&.
150 .UNINDENT
151 .SH OPTIONS
152 .sp
153 \fBllvm\-objdump\fP supports the following options:
154 .INDENT 0.0
155 .TP
156 .B \-\-adjust\-vma=<offset>
157 Increase the displayed address in disassembly or section header printing by
158 the specified offset.
159 .UNINDENT
160 .INDENT 0.0
161 .TP
162 .B \-\-arch\-name=<string>
163 Specify the target architecture when disassembling. Use \fI\%\-\-version\fP
164 for a list of available targets.
165 .UNINDENT
166 .INDENT 0.0
167 .TP
168 .B \-C, \-\-demangle
169 Demangle symbol names in the output.
170 .UNINDENT
171 .INDENT 0.0
172 .TP
173 .B \-\-debug\-vars=<format>
174 Print the locations (in registers or memory) of source\-level variables
175 alongside disassembly. \fBformat\fP may be \fBunicode\fP or \fBascii\fP, defaulting
176 to \fBunicode\fP if omitted.
177 .UNINDENT
178 .INDENT 0.0
179 .TP
180 .B \-\-debug\-vars\-indent=<width>
181 Distance to indent the source\-level variable display, relative to the start
182 of the disassembly. Defaults to 40 characters.
183 .UNINDENT
184 .INDENT 0.0
185 .TP
186 .B \-j, \-\-section=<section1[,section2,...]>
187 Perform commands on the specified sections only. For Mach\-O use
188 \fIsegment,section\fP to specify the section name.
189 .UNINDENT
190 .INDENT 0.0
191 .TP
192 .B \-l, \-\-line\-numbers
193 When disassembling, display source line numbers. Implies
194 \fI\%\-\-disassemble\fP\&.
195 .UNINDENT
196 .INDENT 0.0
197 .TP
198 .B \-M, \-\-disassembler\-options=<opt1[,opt2,...]>
199 Pass target\-specific disassembler options. Currently supported for ARM targets
200 only. Available options are \fBreg\-names\-std\fP and \fBreg\-names\-raw\fP\&.
201 .UNINDENT
202 .INDENT 0.0
203 .TP
204 .B \-\-mcpu=<cpu\-name>
205 Target a specific CPU type for disassembly. Specify \fB\-\-mcpu=help\fP to display
206 available CPUs.
207 .UNINDENT
208 .INDENT 0.0
209 .TP
210 .B \-\-mattr=<a1,+a2,\-a3,...>
211 Enable/disable target\-specific attributes. Specify \fB\-\-mattr=help\fP to display
212 the available attributes.
213 .UNINDENT
214 .INDENT 0.0
215 .TP
216 .B \-\-no\-leading\-addr
217 When disassembling, do not print leading addresses.
218 .UNINDENT
219 .INDENT 0.0
220 .TP
221 .B \-\-no\-show\-raw\-insn
222 When disassembling, do not print the raw bytes of each instruction.
223 .UNINDENT
224 .INDENT 0.0
225 .TP
226 .B \-\-prefix=<prefix>
227 When disassembling with the \fI\%\-\-source\fP option, prepend \fBprefix\fP to
228 absolute paths.
229 .UNINDENT
230 .INDENT 0.0
231 .TP
232 .B \-\-print\-imm\-hex
233 Use hex format when printing immediate values in disassembly output.
234 .UNINDENT
235 .INDENT 0.0
236 .TP
237 .B \-S, \-\-source
238 When disassembling, display source interleaved with the disassembly. Implies
239 \fI\%\-\-disassemble\fP\&.
240 .UNINDENT
241 .INDENT 0.0
242 .TP
243 .B \-\-show\-lma
244 Display the LMA column when dumping ELF section headers. Defaults to off
245 unless any section has different VMA and LMAs.
246 .UNINDENT
247 .INDENT 0.0
248 .TP
249 .B \-\-start\-address=<address>
250 When disassembling, only disassemble from the specified address.
251 .sp
252 When printing relocations, only print the relocations patching offsets from at least \fBaddress\fP\&.
253 .sp
254 When printing symbols, only print symbols with a value of at least \fBaddress\fP\&.
255 .UNINDENT
256 .INDENT 0.0
257 .TP
258 .B \-\-stop\-address=<address>
259 When disassembling, only disassemble up to, but not including the specified address.
260 .sp
261 When printing relocations, only print the relocations patching offsets up to \fBaddress\fP\&.
262 .sp
263 When printing symbols, only print symbols with a value up to \fBaddress\fP\&.
264 .UNINDENT
265 .INDENT 0.0
266 .TP
267 .B \-\-symbolize\-operands
268 When disassembling, symbolize a branch target operand to print a label instead of a real address.
269 .sp
270 When printing a PC\-relative global symbol reference, print it as an offset from the leading symbol.
271 .sp
272 Only works with an X86 linked image.
273 .INDENT 7.0
274 .TP
275 .B Example:
276 A non\-symbolized branch instruction with a local target and pc\-relative memory access like
277 .UNINDENT
278 .INDENT 7.0
279 .INDENT 3.5
280 .sp
281 .nf
282 .ft C
283 cmp eax, dword ptr [rip + 4112]
284 jge 0x20117e <_start+0x25>
285 .ft P
286 .fi
287 .UNINDENT
288 .UNINDENT
289 .sp
290 might become
291 .INDENT 7.0
292 .INDENT 3.5
293 .sp
294 .nf
295 .ft C
296 <L0>:
297   cmp eax, dword ptr <g>
298   jge      <L0>
299 .ft P
300 .fi
301 .UNINDENT
302 .UNINDENT
303 .UNINDENT
304 .INDENT 0.0
305 .TP
306 .B \-\-triple=<string>
307 Target triple to disassemble for, see \fB\-\-version\fP for available targets.
308 .UNINDENT
309 .INDENT 0.0
310 .TP
311 .B \-w, \-\-wide
312 Ignored for compatibility with GNU objdump.
313 .UNINDENT
314 .INDENT 0.0
315 .TP
316 .B \-\-x86\-asm\-syntax=<style>
317 When used with \fI\%\-\-disassemble\fP, choose style of code to emit from
318 X86 backend. Supported values are:
319 .INDENT 7.0
320 .INDENT 3.5
321 .INDENT 0.0
322 .TP
323 .B att
324 AT&T\-style assembly
325 .UNINDENT
326 .INDENT 0.0
327 .TP
328 .B intel
329 Intel\-style assembly
330 .UNINDENT
331 .UNINDENT
332 .UNINDENT
333 .sp
334 The default disassembly style is \fBatt\fP\&.
335 .UNINDENT
336 .INDENT 0.0
337 .TP
338 .B \-z, \-\-disassemble\-zeroes
339 Do not skip blocks of zeroes when disassembling.
340 .UNINDENT
341 .INDENT 0.0
342 .TP
343 .B @<FILE>
344 Read command\-line options and commands from response file \fI<FILE>\fP\&.
345 .UNINDENT
346 .SH MACH-O ONLY OPTIONS AND COMMANDS
347 .INDENT 0.0
348 .TP
349 .B \-\-arch=<architecture>
350 Specify the architecture to disassemble. see \fB\-\-version\fP for available
351 architectures.
352 .UNINDENT
353 .INDENT 0.0
354 .TP
355 .B \-\-archive\-member\-offsets
356 Print the offset to each archive member for Mach\-O archives (requires
357 \fI\%\-\-archive\-headers\fP).
358 .UNINDENT
359 .INDENT 0.0
360 .TP
361 .B \-\-bind
362 Display binding info
363 .UNINDENT
364 .INDENT 0.0
365 .TP
366 .B \-\-cfg
367 Create a CFG for every symbol in the object file and write it to a graphviz
368 file.
369 .UNINDENT
370 .INDENT 0.0
371 .TP
372 .B \-\-data\-in\-code
373 Display the data in code table.
374 .UNINDENT
375 .INDENT 0.0
376 .TP
377 .B \-\-dis\-symname=<name>
378 Disassemble just the specified symbol\(aqs instructions.
379 .UNINDENT
380 .INDENT 0.0
381 .TP
382 .B \-\-dylibs\-used
383 Display the shared libraries used for linked files.
384 .UNINDENT
385 .INDENT 0.0
386 .TP
387 .B \-\-dsym=<string>
388 Use .dSYM file for debug info.
389 .UNINDENT
390 .INDENT 0.0
391 .TP
392 .B \-\-dylib\-id
393 Display the shared library\(aqs ID for dylib files.
394 .UNINDENT
395 .INDENT 0.0
396 .TP
397 .B \-\-exports\-trie
398 Display exported symbols.
399 .UNINDENT
400 .INDENT 0.0
401 .TP
402 .B \-g
403 Print line information from debug info if available.
404 .UNINDENT
405 .INDENT 0.0
406 .TP
407 .B \-\-full\-leading\-addr
408 Print the full leading address when disassembling.
409 .UNINDENT
410 .INDENT 0.0
411 .TP
412 .B \-\-indirect\-symbols
413 Display the indirect symbol table.
414 .UNINDENT
415 .INDENT 0.0
416 .TP
417 .B \-\-info\-plist
418 Display the info plist section as strings.
419 .UNINDENT
420 .INDENT 0.0
421 .TP
422 .B \-\-lazy\-bind
423 Display lazy binding info.
424 .UNINDENT
425 .INDENT 0.0
426 .TP
427 .B \-\-link\-opt\-hints
428 Display the linker optimization hints.
429 .UNINDENT
430 .INDENT 0.0
431 .TP
432 .B \-m, \-\-macho
433 Use Mach\-O specific object file parser. Commands and other options may behave
434 differently when used with \fB\-\-macho\fP\&.
435 .UNINDENT
436 .INDENT 0.0
437 .TP
438 .B \-\-no\-leading\-headers
439 Do not print any leading headers.
440 .UNINDENT
441 .INDENT 0.0
442 .TP
443 .B \-\-no\-symbolic\-operands
444 Do not print symbolic operands when disassembling.
445 .UNINDENT
446 .INDENT 0.0
447 .TP
448 .B \-\-non\-verbose
449 Display the information for Mach\-O objects in non\-verbose or numeric form.
450 .UNINDENT
451 .INDENT 0.0
452 .TP
453 .B \-\-objc\-meta\-data
454 Display the Objective\-C runtime meta data.
455 .UNINDENT
456 .INDENT 0.0
457 .TP
458 .B \-\-private\-header
459 Display only the first format specific file header.
460 .UNINDENT
461 .INDENT 0.0
462 .TP
463 .B \-\-rebase
464 Display rebasing information.
465 .UNINDENT
466 .INDENT 0.0
467 .TP
468 .B \-\-universal\-headers
469 Display universal headers.
470 .UNINDENT
471 .INDENT 0.0
472 .TP
473 .B \-\-weak\-bind
474 Display weak binding information.
475 .UNINDENT
476 .SH XCOFF ONLY OPTIONS AND COMMANDS
477 .INDENT 0.0
478 .TP
479 .B \-\-symbol\-description
480 Add symbol description to disassembly output.
481 .UNINDENT
482 .SH BUGS
483 .sp
484 To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>.
485 .SH SEE ALSO
486 .sp
487 \fBllvm\-nm(1)\fP, \fBllvm\-readelf(1)\fP, \fBllvm\-readobj(1)\fP
488 .SH AUTHOR
489 Maintained by the LLVM Team (https://llvm.org/).
490 .SH COPYRIGHT
491 2003-2021, LLVM Project
492 .\" Generated by docutils manpage writer.
493 .