1 llvm-objdump - LLVM's object file dumper
2 ========================================
4 .. program:: llvm-objdump
9 :program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]
13 The :program:`llvm-objdump` utility prints the contents of object files and
14 final 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
16 file name, :program:`llvm-objdump` will process a file on its standard input
21 At least one of the following commands are required, and some commands can be
22 combined with other commands:
24 .. option:: -a, --archive-headers
26 Display the information contained within an archive's headers.
28 .. option:: -d, --disassemble
30 Disassemble all text sections found in the input files.
32 .. option:: -D, --disassemble-all
34 Disassemble all sections found in the input files.
36 .. option:: --disassemble-functions=<symbol1[,symbol2,...]>
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`.
42 .. option:: --dwarf=<value>
44 Dump the specified DWARF debug sections. The supported values are:
46 `frames` - .debug_frame
48 .. option:: -f, --file-headers
50 Display the contents of the overall file header.
52 .. option:: --fault-map-section
54 Display the content of the fault map section.
56 .. option:: -h, --headers, --section-headers
58 Display summaries of the headers for each section.
62 Display usage information and exit. Does not stack with other commands.
64 .. option:: -p, --private-headers
66 Display format-specific file headers.
68 .. option:: -r, --reloc
70 Display the relocation entries in the file.
72 .. option:: -R, --dynamic-reloc
74 Display the dynamic relocation entries in the file.
76 .. option:: --raw-clang-ast
78 Dump the raw binary contents of the clang AST section.
80 .. option:: -s, --full-contents
82 Display the contents of each section.
84 .. option:: -t, --syms
86 Display the symbol table.
88 .. option:: -u, --unwind-info
90 Display the unwind info of the input(s).
94 Display the version of the :program:`llvm-objdump` executable. Does not stack
97 .. option:: -x, --all-headers
99 Display all available header information. Equivalent to specifying
100 :option:`--archive-headers`, :option:`--file-headers`,
101 :option:`--private-headers`, :option:`--reloc`, :option:`--section-headers`,
102 and :option:`--syms`.
106 :program:`llvm-objdump` supports the following options:
108 .. option:: --adjust-vma=<offset>
110 Increase the displayed address in disassembly or section header printing by
111 the specified offset.
113 .. option:: --arch-name=<string>
115 Specify the target architecture when disassembling. Use :option:`--version`
116 for a list of available targets.
118 .. option:: -C, --demangle
120 Demangle symbol names in the output.
122 .. option:: -j, --section=<section1[,section2,...]>
124 Perform commands on the specified sections only. For Mach-O use
125 `segment,section` to specify the section name.
127 .. option:: -l, --line-numbers
129 When disassembling, display source line numbers. Implies
130 :option:`--disassemble`.
132 .. option:: -M, --disassembler-options=<opt1[,opt2,...]>
134 Pass target-specific disassembler options. Currently supported for ARM targets
135 only. Available options are ``reg-names-std`` and ``reg-names-raw``.
137 .. option:: --mcpu=<cpu-name>
139 Target a specific CPU type for disassembly. Specify ``--mcpu=help`` to display
142 .. option:: --mattr=<a1,+a2,-a3,...>
144 Enable/disable target-specific attributes. Specify ``--mcpu=help`` to display
145 the available attributes.
147 .. option:: --no-leading-addr
149 When disassembling, do not print leading addresses.
151 .. option:: --no-show-raw-insn
153 When disassembling, do not print the raw bytes of each instruction.
155 .. option:: --print-imm-hex
157 Use hex format when printing immediate values in disassembly output.
159 .. option:: -S, --source
161 When disassembling, display source interleaved with the disassembly. Implies
162 :option:`--disassemble`.
164 .. option:: --show-lma
166 Display the LMA column when dumping ELF section headers. Defaults to off
167 unless any section has different VMA and LMAs.
169 .. option:: --start-address=<address>
171 When disassembling, only disassemble from the specified address.
173 When printing relocations, only print the relocations patching offsets from at least ``address``.
175 When printing symbols, only print symbols with a value of at least ``address``.
177 .. option:: --stop-address=<address>
179 When disassembling, only disassemble up to, but not including the specified address.
181 When printing relocations, only print the relocations patching offsets up to ``address``.
183 When printing symbols, only print symbols with a value up to ``address``.
185 .. option:: --triple=<string>
187 Target triple to disassemble for, see ``--version`` for available targets.
189 .. option:: -w, --wide
191 Ignored for compatibility with GNU objdump.
193 .. option:: --x86-asm-syntax=<style>
195 When used with :option:`--disassemble`, choose style of code to emit from
196 X86 backend. Supported values are:
207 The default disassembly style is **att**.
209 .. option:: -z, --disassemble-zeroes
211 Do not skip blocks of zeroes when disassembling.
215 Read command-line options and commands from response file `<FILE>`.
217 MACH-O ONLY OPTIONS AND COMMANDS
218 --------------------------------
220 .. option:: --arch=<architecture>
222 Specify the architecture to disassemble. see ``--version`` for available
225 .. option:: --archive-member-offsets
227 Print the offset to each archive member for Mach-O archives (requires
228 :option:`--archive-headers`).
236 Create a CFG for every symbol in the object file and write it to a graphviz
239 .. option:: --data-in-code
241 Display the data in code table.
243 .. option:: --dis-symname=<name>
245 Disassemble just the specified symbol's instructions.
247 .. option:: --dylibs-used
249 Display the shared libraries used for linked files.
251 .. option:: --dsym=<string>
253 Use .dSYM file for debug info.
255 .. option:: --dylib-id
257 Display the shared library's ID for dylib files.
259 .. option:: --exports-trie
261 Display exported symbols.
265 Print line information from debug info if available.
267 .. option:: --full-leading-addr
269 Print the full leading address when disassembling.
271 .. option:: --indirect-symbols
273 Display the indirect symbol table.
275 .. option:: --info-plist
277 Display the info plist section as strings.
279 .. option:: --lazy-bind
281 Display lazy binding info.
283 .. option:: --link-opt-hints
285 Display the linker optimization hints.
287 .. option:: -m, --macho
289 Use Mach-O specific object file parser. Commands and other options may behave
290 differently when used with ``--macho``.
292 .. option:: --no-leading-headers
294 Do not print any leading headers.
296 .. option:: --no-symbolic-operands
298 Do not print symbolic operands when disassembling.
300 .. option:: --non-verbose
302 Display the information for Mach-O objects in non-verbose or numeric form.
304 .. option:: --objc-meta-data
306 Display the Objective-C runtime meta data.
308 .. option:: --private-header
310 Display only the first format specific file header.
314 Display rebasing information.
316 .. option:: --universal-headers
318 Display universal headers.
320 .. option:: --weak-bind
322 Display weak binding information.
327 To report bugs, please visit <http://llvm.org/bugs/>.
332 :manpage:`llvm-nm(1)`, :manpage:`llvm-readelf(1)`, :manpage:`llvm-readobj(1)`