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