blob: c3e7c166005b637cfe10bde4e91ece3558ef2f5c [file] [log] [blame]
Michael Trentc1affcd2018-08-08 14:39:22 +00001llvm-objdump - LLVM's object file dumper
2========================================
3
4SYNOPSIS
5--------
6
7:program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]
8
9DESCRIPTION
10-----------
11The :program:`llvm-objdump` utility prints the contents of object files and
12final linked images named on the command line. If no file name is specified,
13:program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a
14file name, :program:`llvm-objdump` will process a file on its standard input
15stream.
16
17COMMANDS
18--------
Michael Trente9414c22019-01-15 20:41:30 +000019At least one of the following commands are required, and some commands can be
20combined with other commands:
Michael Trentc1affcd2018-08-08 14:39:22 +000021
Michael Trente9414c22019-01-15 20:41:30 +000022.. option:: -d, -disassemble
Michael Trentc1affcd2018-08-08 14:39:22 +000023
Michael Trente9414c22019-01-15 20:41:30 +000024 Display assembler mnemonics for the machine instructions. Disassembles all
25 text sections found in the input file(s).
26
27.. option:: -D, -disassemble-all
28
29 Display assembler mnemonics for the machine instructions. Disassembles all
30 sections found in the input file(s).
31
Michael Trentc1affcd2018-08-08 14:39:22 +000032.. option:: -help
33
34 Display usage information and exit. Does not stack with other commands.
35
36.. option:: -r
37
38 Display the relocation entries in the file.
39
40.. option:: -s
41
42 Display the content of each section.
43
44.. option:: -section-headers
45
46 Display summaries of the headers for each section.
47
48.. option:: -t
49
50 Display the symbol table.
51
52.. option:: -version
53
54 Display the version of this program. Does not stack with other commands.
Michael Trente9414c22019-01-15 20:41:30 +000055
Michael Trentc1affcd2018-08-08 14:39:22 +000056OPTIONS
57-------
58:program:`llvm-objdump` supports the following options:
59
60.. option:: -arch=<architecture>
61
Michael Trente9414c22019-01-15 20:41:30 +000062 Specify the architecture to disassemble. see ``-version`` for available
Michael Trentc1affcd2018-08-08 14:39:22 +000063 architectures.
64
65.. option:: -cfg
66
67 Create a CFG for every symbol in the object file and write it to a graphviz
68 file (Mach-O-only).
69
70.. option:: -dsym=<string>
71
72 Use .dSYM file for debug info.
73
74.. option:: -g
75
76 Print line information from debug info if available.
77
Michael Trente9414c22019-01-15 20:41:30 +000078.. option:: -m, -macho
Michael Trentc1affcd2018-08-08 14:39:22 +000079
Michael Trente9414c22019-01-15 20:41:30 +000080 Use Mach-O specific object file parser. Commands and other options may behave
81 differently when used with ``-macho``.
Michael Trentc1affcd2018-08-08 14:39:22 +000082
83.. option:: -mattr=<a1,+a2,-a3,...>
84
85 Target specific attributes.
Michael Trente9414c22019-01-15 20:41:30 +000086
Michael Trentc1affcd2018-08-08 14:39:22 +000087.. option:: -mc-x86-disable-arith-relaxation
88
89 Disable relaxation of arithmetic instruction for X86.
90
91.. option:: -stats
92
93 Enable statistics output from program.
Michael Trente9414c22019-01-15 20:41:30 +000094
Michael Trentc1affcd2018-08-08 14:39:22 +000095.. option:: -triple=<string>
96
Michael Trente9414c22019-01-15 20:41:30 +000097 Target triple to disassemble for, see ``-version`` for available targets.
98
Michael Trentc1affcd2018-08-08 14:39:22 +000099.. option:: -x86-asm-syntax=<style>
100
101 When used with the ``-disassemble`` option, choose style of code to emit from
102 X86 backend. Supported values are:
103
104 .. option:: att
Michael Trente9414c22019-01-15 20:41:30 +0000105
Michael Trentc1affcd2018-08-08 14:39:22 +0000106 AT&T-style assembly
Michael Trente9414c22019-01-15 20:41:30 +0000107
Michael Trentc1affcd2018-08-08 14:39:22 +0000108 .. option:: intel
Michael Trente9414c22019-01-15 20:41:30 +0000109
Michael Trentc1affcd2018-08-08 14:39:22 +0000110 Intel-style assembly
111
Michael Trente9414c22019-01-15 20:41:30 +0000112
113 The default disassembly style is **att**.
Michael Trentc1affcd2018-08-08 14:39:22 +0000114
115BUGS
116----
117
118To report bugs, please visit <http://llvm.org/bugs/>.
119
120SEE ALSO
121--------
122
123:manpage:`llvm-nm(1)`