1llvm-objdump - LLVM's object file dumper
2========================================
3
4.. program:: llvm-objdump
5
6SYNOPSIS
7--------
8
9:program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]
10
11DESCRIPTION
12-----------
13The :program:`llvm-objdump` utility prints the contents of object files and
14final linked images named on the command line. If no file name is specified,
15:program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a
16file name, :program:`llvm-objdump` will process a file on its standard input
17stream.
18
19COMMANDS
20--------
21At least one of the following commands are required, and some commands can be
22combined with other commands:
23
24.. option:: -a, --archive-headers
25
26  Display the information contained within an archive's headers.
27
28.. option:: -d, --disassemble
29
30  Display assembler mnemonics for the machine instructions. Disassembles all
31  text sections found in the input file(s) by default.
32
33.. option:: -D, --disassemble-all
34
35  Display assembler mnemonics for the machine instructions. Disassembles all
36  sections found in the input file(s) by default.
37
38.. option:: --disassemble-functions=<symbol1[,symbol2,...]>
39
40  Disassemble only the specified symbols. Takes demangled symbol names when
41  :option:`--demangle` is specified, otherwise takes mangled symbol names.
42  Implies :option:`--disassemble`.
43
44.. option:: --dwarf=<value>
45
46  Dump the specified DWARF debug sections. The supported values are:
47
48  `frames` - .debug_frame
49
50.. option:: -f, --file-headers
51
52  Display the contents of the overall file header.
53
54.. option:: --fault-map-section
55
56  Display the content of the fault map section.
57
58.. option:: -h, --headers, --section-headers
59
60  Display summaries of the headers for each section.
61
62.. option:: --help
63
64  Display usage information and exit. Does not stack with other commands.
65
66.. option:: -p, --private-headers
67
68  Display format-specific file headers.
69
70.. option:: -r, --reloc
71
72  Display the relocation entries in the file.
73
74.. option:: -R, --dynamic-reloc
75
76  Display the dynamic relocation entries in the file.
77
78.. option:: --raw-clang-ast
79
80  Dump the raw binary contents of the clang AST section.
81
82.. option:: -s, --full-contents
83
84  Display the contents of each section.
85
86.. option:: -t, --syms
87
88  Display the symbol table.
89
90.. option:: -u, --unwind-info
91
92  Display the unwind info of the input(s).
93
94.. option:: --version
95
96  Display the version of this program. Does not stack with other commands.
97
98.. option:: -x, --all-headers
99
100  Display all available header information. Equivalent to specifying
101  :option:`--archive-headers`, :option:`--file-headers`,
102  :option:`--private-headers`, :option:`--reloc`, :option:`--section-headers`,
103  and :option:`--syms`.
104
105OPTIONS
106-------
107:program:`llvm-objdump` supports the following options:
108
109.. option:: --adjust-vma=<offset>
110
111  Increase the displayed address in disassembly or section header printing by
112  the specified offset.
113
114.. option:: --arch-name=<string>
115
116  Specify the target architecture when disassembling. Use :option:`--version`
117  for a list of available targets.
118
119.. option:: -C, --demangle
120
121  Demangle symbol names in the output.
122
123.. option:: -j, --section=<section1[,section2,...]>
124
125  Perform the specified command(s) on the specified section(s) only. For Mach-O
126  use `segment,section` to specify the section name.
127
128.. option:: -l, --line-numbers
129
130  When disassembling, display source line numbers with disassembly. Implies
131  :option:`--disassemble`.
132
133.. option:: -M, --disassembler-options=<opt1[,opt2,...]>
134
135  Pass target-specific disassembler options. Currently supported for ARM targets
136  only. Available options are ``reg-names-std`` and ``reg-names-raw``.
137
138.. option:: --mcpu=<cpu-name>
139
140  Target a specific CPU type for disassembly. Specify ``--mcpu=help`` to display
141  available CPUs.
142
143.. option:: --mattr=<a1,+a2,-a3,...>
144
145  Enable/disable target-specific attributes. Specify ``--mcpu=help`` to display
146  the available attributes.
147
148.. option:: --no-leading-addr
149
150  When disassembling, do not print the leading address in the disassembly
151  output.
152
153.. option:: --no-show-raw-insn
154
155  When disassembling instructions, do not print the raw bytes of the
156  instruction.
157
158.. option:: --print-imm-hex
159
160  Use hex format when printing immediate values in disassembly output.
161
162.. option:: -S, --source
163
164  When disassembling, display source inlined with the disassembly.
165  Implies :option:`--disassemble`.
166
167.. option:: --show-lma
168
169  Display the LMA column when dumping ELF section headers. Defaults to off
170  unless any section has different VMA and LMAs.
171
172.. option:: --start-address=<address>
173
174  When disassembling, only disassemble from the specified address.
175
176  When printing relocations, only print the relocations patching offsets from at least ``address``.
177
178  When printing symbols, only print symbols with a value of at least ``address``.
179
180.. option:: --stop-address=<address>
181
182  When disassembling, only disassemble up to, but not including the specified address.
183
184  When printing relocations, only print the relocations patching offsets up to ``address``.
185
186  When printing symbols, only print symbols with a value up to ``address``.
187
188.. option:: --triple=<string>
189
190  Target triple to disassemble for, see ``--version`` for available targets.
191
192.. option:: -w, --wide
193
194  Ignored for compatibility with GNU objdump.
195
196.. option:: --x86-asm-syntax=<style>
197
198  When used with :option:`--disassemble`, choose style of code to emit from
199  X86 backend. Supported values are:
200
201   .. option:: att
202
203    AT&T-style assembly
204
205   .. option:: intel
206
207    Intel-style assembly
208
209
210  The default disassembly style is **att**.
211
212.. option:: -z, --disassemble-zeroes
213
214  Do not skip blocks of zeroes when disassembling.
215
216.. option:: @<FILE>
217
218  Read command-line options and commands from response file `<FILE>`.
219
220MACH-O ONLY OPTIONS AND COMMANDS
221--------------------------------
222
223.. option:: --arch=<architecture>
224
225  Specify the architecture to disassemble. see ``--version`` for available
226  architectures.
227
228.. option:: --archive-member-offsets
229
230  Print the offset to each archive member for Mach-O archives (requires
231  :option:`--archive-headers`).
232
233.. option:: --bind
234
235  Display binding info
236
237.. option:: --cfg
238
239  Create a CFG for every symbol in the object file and write it to a graphviz
240  file.
241
242.. option:: --data-in-code
243
244  Display the data in code table.
245
246.. option:: --dis-symname=<name>
247
248  Disassemble just the specified symbol's instructions.
249
250.. option:: --dylibs-used
251
252  Display the shared libraries used for linked files.
253
254.. option:: --dsym=<string>
255
256  Use .dSYM file for debug info.
257
258.. option:: --dylib-id
259
260  Display the shared library's ID for dylib files.
261
262.. option:: --exports-trie
263
264  Display exported symbols.
265
266.. option:: -g
267
268  Print line information from debug info if available.
269
270.. option:: --full-leading-addr
271
272  Print the full leading address when disassembling.
273
274.. option:: --indirect-symbols
275
276  Display the indirect symbol table.
277
278.. option:: --info-plist
279
280  Display the info plist section as strings.
281
282.. option:: --lazy-bind
283
284  Display lazy binding info.
285
286.. option:: --link-opt-hints
287
288  Display the linker optimization hints.
289
290.. option:: -m, --macho
291
292  Use Mach-O specific object file parser. Commands and other options may behave
293  differently when used with ``--macho``.
294
295.. option:: --no-leading-headers
296
297  Do not print any leading headers.
298
299.. option:: --no-symbolic-operands
300
301  Do not print symbolic operands when disassembling.
302
303.. option:: --non-verbose
304
305  Display the information for Mach-O objects in non-verbose or numeric form.
306
307.. option:: --objc-meta-data
308
309  Display the Objective-C runtime meta data.
310
311.. option:: --private-header
312
313  Display only the first format specific file header.
314
315.. option:: --rebase
316
317  Display rebasing information.
318
319.. option:: --universal-headers
320
321  Display universal headers.
322
323.. option:: --weak-bind
324
325  Display weak binding information.
326
327BUGS
328----
329
330To report bugs, please visit <http://llvm.org/bugs/>.
331
332SEE ALSO
333--------
334
335:manpage:`llvm-nm(1)`, :manpage:`llvm-readelf(1)`, :manpage:`llvm-readobj(1)`
336