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  Disassemble all text sections found in the input files.
31
32.. option:: -D, --disassemble-all
33
34  Disassemble all sections found in the input files.
35
36.. option:: --disassemble-symbols=<symbol1[,symbol2,...]>
37
38  Disassemble only the specified symbols. Takes demangled symbol names when
39  :option:`--demangle` is specified, otherwise takes mangled symbol names.
40  Implies :option:`--disassemble`.
41
42.. option:: --dwarf=<value>
43
44  Dump the specified DWARF debug sections. The supported values are:
45
46  `frames` - .debug_frame
47
48.. option:: -f, --file-headers
49
50  Display the contents of the overall file header.
51
52.. option:: --fault-map-section
53
54  Display the content of the fault map section.
55
56.. option:: -h, --headers, --section-headers
57
58  Display summaries of the headers for each section.
59
60.. option:: --help
61
62  Display usage information and exit. Does not stack with other commands.
63
64.. option:: -p, --private-headers
65
66  Display format-specific file headers.
67
68.. option:: -r, --reloc
69
70  Display the relocation entries in the file.
71
72.. option:: -R, --dynamic-reloc
73
74  Display the dynamic relocation entries in the file.
75
76.. option:: --raw-clang-ast
77
78  Dump the raw binary contents of the clang AST section.
79
80.. option:: -s, --full-contents
81
82  Display the contents of each section.
83
84.. option:: -t, --syms
85
86  Display the symbol table.
87
88.. option:: -T, --dynamic-syms
89
90  Display the contents of the dynamic symbol table.
91
92.. option:: -u, --unwind-info
93
94  Display the unwind info of the input(s).
95
96.. option:: --version
97
98  Display the version of the :program:`llvm-objdump` executable. Does not stack
99  with other commands.
100
101.. option:: -x, --all-headers
102
103  Display all available header information. Equivalent to specifying
104  :option:`--archive-headers`, :option:`--file-headers`,
105  :option:`--private-headers`, :option:`--reloc`, :option:`--section-headers`,
106  and :option:`--syms`.
107
108OPTIONS
109-------
110:program:`llvm-objdump` supports the following options:
111
112.. option:: --adjust-vma=<offset>
113
114  Increase the displayed address in disassembly or section header printing by
115  the specified offset.
116
117.. option:: --arch-name=<string>
118
119  Specify the target architecture when disassembling. Use :option:`--version`
120  for a list of available targets.
121
122.. option:: -C, --demangle
123
124  Demangle symbol names in the output.
125
126.. option:: --debug-vars=<format>
127
128  Print the locations (in registers or memory) of source-level variables
129  alongside disassembly. ``format`` may be ``unicode`` or ``ascii``, defaulting
130  to ``unicode`` if omitted.
131
132.. option:: --debug-vars-indent=<width>
133
134  Distance to indent the source-level variable display, relative to the start
135  of the disassembly. Defaults to 40 characters.
136
137.. option:: -j, --section=<section1[,section2,...]>
138
139  Perform commands on the specified sections only. For Mach-O use
140  `segment,section` to specify the section name.
141
142.. option:: -l, --line-numbers
143
144  When disassembling, display source line numbers. Implies
145  :option:`--disassemble`.
146
147.. option:: -M, --disassembler-options=<opt1[,opt2,...]>
148
149  Pass target-specific disassembler options. Currently supported for ARM targets
150  only. Available options are ``reg-names-std`` and ``reg-names-raw``.
151
152.. option:: --mcpu=<cpu-name>
153
154  Target a specific CPU type for disassembly. Specify ``--mcpu=help`` to display
155  available CPUs.
156
157.. option:: --mattr=<a1,+a2,-a3,...>
158
159  Enable/disable target-specific attributes. Specify ``--mcpu=help`` to display
160  the available attributes.
161
162.. option:: --no-leading-addr
163
164  When disassembling, do not print leading addresses.
165
166.. option:: --no-show-raw-insn
167
168  When disassembling, do not print the raw bytes of each instruction.
169
170.. option:: --print-imm-hex
171
172  Use hex format when printing immediate values in disassembly output.
173
174.. option:: -S, --source
175
176  When disassembling, display source interleaved with the disassembly. Implies
177  :option:`--disassemble`.
178
179.. option:: --show-lma
180
181  Display the LMA column when dumping ELF section headers. Defaults to off
182  unless any section has different VMA and LMAs.
183
184.. option:: --start-address=<address>
185
186  When disassembling, only disassemble from the specified address.
187
188  When printing relocations, only print the relocations patching offsets from at least ``address``.
189
190  When printing symbols, only print symbols with a value of at least ``address``.
191
192.. option:: --stop-address=<address>
193
194  When disassembling, only disassemble up to, but not including the specified address.
195
196  When printing relocations, only print the relocations patching offsets up to ``address``.
197
198  When printing symbols, only print symbols with a value up to ``address``.
199
200.. option:: --symbolize-operands
201
202  When disassembling, symbolize a branch target operand to print a label instead of a real address.
203
204  When printing a PC-relative global symbol reference, print it as an offset from the leading symbol.
205
206  Only works with an X86 linked image.
207
208  Example:
209    A non-symbolized branch instruction with a local target and pc-relative memory access like
210
211  .. code-block:: none
212
213      cmp eax, dword ptr [rip + 4112]
214      jge 0x20117e <_start+0x25>
215
216  might become
217
218  .. code-block:: none
219
220     <L0>:
221       cmp eax, dword ptr <g>
222       jge	<L0>
223
224.. option:: --triple=<string>
225
226  Target triple to disassemble for, see ``--version`` for available targets.
227
228.. option:: -w, --wide
229
230  Ignored for compatibility with GNU objdump.
231
232.. option:: --x86-asm-syntax=<style>
233
234  When used with :option:`--disassemble`, choose style of code to emit from
235  X86 backend. Supported values are:
236
237   .. option:: att
238
239    AT&T-style assembly
240
241   .. option:: intel
242
243    Intel-style assembly
244
245
246  The default disassembly style is **att**.
247
248.. option:: -z, --disassemble-zeroes
249
250  Do not skip blocks of zeroes when disassembling.
251
252.. option:: @<FILE>
253
254  Read command-line options and commands from response file `<FILE>`.
255
256MACH-O ONLY OPTIONS AND COMMANDS
257--------------------------------
258
259.. option:: --arch=<architecture>
260
261  Specify the architecture to disassemble. see ``--version`` for available
262  architectures.
263
264.. option:: --archive-member-offsets
265
266  Print the offset to each archive member for Mach-O archives (requires
267  :option:`--archive-headers`).
268
269.. option:: --bind
270
271  Display binding info
272
273.. option:: --cfg
274
275  Create a CFG for every symbol in the object file and write it to a graphviz
276  file.
277
278.. option:: --data-in-code
279
280  Display the data in code table.
281
282.. option:: --dis-symname=<name>
283
284  Disassemble just the specified symbol's instructions.
285
286.. option:: --dylibs-used
287
288  Display the shared libraries used for linked files.
289
290.. option:: --dsym=<string>
291
292  Use .dSYM file for debug info.
293
294.. option:: --dylib-id
295
296  Display the shared library's ID for dylib files.
297
298.. option:: --exports-trie
299
300  Display exported symbols.
301
302.. option:: -g
303
304  Print line information from debug info if available.
305
306.. option:: --full-leading-addr
307
308  Print the full leading address when disassembling.
309
310.. option:: --indirect-symbols
311
312  Display the indirect symbol table.
313
314.. option:: --info-plist
315
316  Display the info plist section as strings.
317
318.. option:: --lazy-bind
319
320  Display lazy binding info.
321
322.. option:: --link-opt-hints
323
324  Display the linker optimization hints.
325
326.. option:: -m, --macho
327
328  Use Mach-O specific object file parser. Commands and other options may behave
329  differently when used with ``--macho``.
330
331.. option:: --no-leading-headers
332
333  Do not print any leading headers.
334
335.. option:: --no-symbolic-operands
336
337  Do not print symbolic operands when disassembling.
338
339.. option:: --non-verbose
340
341  Display the information for Mach-O objects in non-verbose or numeric form.
342
343.. option:: --objc-meta-data
344
345  Display the Objective-C runtime meta data.
346
347.. option:: --private-header
348
349  Display only the first format specific file header.
350
351.. option:: --rebase
352
353  Display rebasing information.
354
355.. option:: --universal-headers
356
357  Display universal headers.
358
359.. option:: --weak-bind
360
361  Display weak binding information.
362
363XCOFF ONLY OPTIONS AND COMMANDS
364---------------------------------
365
366.. option:: --symbol-description
367
368  Add symbol description to disassembly output.
369
370BUGS
371----
372
373To report bugs, please visit <https://bugs.llvm.org/>.
374
375SEE ALSO
376--------
377
378:manpage:`llvm-nm(1)`, :manpage:`llvm-readelf(1)`, :manpage:`llvm-readobj(1)`
379