1LLVM-OBJDUMP(1)                      LLVM                      LLVM-OBJDUMP(1)
2
3
4

NAME

6       llvm-objdump - LLVM's object file dumper
7

SYNOPSIS

9       llvm-objdump [commands] [options] [filenames...]
10

DESCRIPTION

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

COMMANDS

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 executable sections found in the input files. On
26              some architectures (AArch64, PPC64, x86), all known instructions
27              are disassembled by default. On the others, --mcpu or --mattr is
28              needed to enable some instruction  sets.  Disabled  instructions
29              are displayed as <unknown>.
30
31       -D, --disassemble-all
32              Disassemble all sections found in the input files.
33
34       --disassemble-symbols=<symbol1[,symbol2,...]>
35              Disassemble  only  the specified symbols. Takes demangled symbol
36              names when --demangle is specified, otherwise takes mangled sym‐
37              bol names.  Implies --disassemble.
38
39       --dwarf=<value>
40              Dump  the  specified  DWARF debug sections. The supported values
41              are:
42
43              frames - .debug_frame
44
45       -f, --file-headers
46              Display the contents of the overall file header.
47
48       --fault-map-section
49              Display the content of the fault map section.
50
51       -h, --headers, --section-headers
52              Display summaries of the headers for each section.
53
54       --help Display usage information and exit. Does not  stack  with  other
55              commands.
56
57       -p, --private-headers
58              Display format-specific file headers.
59
60       -r, --reloc
61              Display the relocation entries in the file.
62
63       -R, --dynamic-reloc
64              Display the dynamic relocation entries in the file.
65
66       --raw-clang-ast
67              Dump the raw binary contents of the clang AST section.
68
69       -s, --full-contents
70              Display the contents of each section.
71
72       -t, --syms
73              Display the symbol table.
74
75       -T, --dynamic-syms
76              Display the contents of the dynamic symbol table.
77
78       -u, --unwind-info
79              Display the unwind info of the input(s).
80
81              This  operation  is only currently supported for COFF and Mach-O
82              object files.
83
84       -v, --version
85              Display the version of the  llvm-objdump  executable.  Does  not
86              stack with other commands.
87
88       -x, --all-headers
89              Display all available header information. Equivalent to specify‐
90              ing   --archive-headers,   --file-headers,    --private-headers,
91              --reloc, --section-headers, and --syms.
92

OPTIONS

94       llvm-objdump supports the following options:
95
96       --adjust-vma=<offset>
97              Increase  the displayed address in disassembly or section header
98              printing by the specified offset.
99
100       --arch-name=<string>
101              Specify  the  target  architecture   when   disassembling.   Use
102              --version for a list of available targets.
103
104       -C, --demangle
105              Demangle symbol names in the output.
106
107       --debug-vars=<format>
108              Print  the  locations  (in  registers or memory) of source-level
109              variables alongside disassembly. format may be unicode or ascii,
110              defaulting to unicode if omitted.
111
112       --debug-vars-indent=<width>
113              Distance  to  indent the source-level variable display, relative
114              to the start of the disassembly. Defaults to 52 characters.
115
116       -j, --section=<section1[,section2,...]>
117              Perform commands on the specified sections only. For Mach-O  use
118              segment,section to specify the section name.
119
120       -l, --line-numbers
121              When   disassembling,   display  source  line  numbers.  Implies
122              --disassemble.
123
124       -M, --disassembler-options=<opt1[,opt2,...]>
125              Pass target-specific disassembler options. Available options:
126
127reg-names-std: ARM only (default). Print in ARM 's instruction
128                set documentation, with r13/r14/r15 replaced by sp/lr/pc.
129
130reg-names-raw:  ARM  only. Use r followed by the register num‐
131                ber.
132
133no-aliases: AArch64 and RISC-V  only.  Print  raw  instruction
134                mnemonic instead of pseudo instruction mnemonic.
135
136numeric:  RISC-V only. Print raw register names instead of ABI
137                mnemonic. (e.g. print x1 instead of ra)
138
139att: x86 only (default). Print in the AT&T syntax.
140
141intel: x86 only. Print in the intel syntax.
142
143       --mcpu=<cpu-name>
144              Target a specific CPU type for disassembly. Specify  --mcpu=help
145              to display available CPUs.
146
147       --mattr=<a1,+a2,-a3,...>
148              Enable/disable  target-specific attributes. Specify --mattr=help
149              to display the available attributes.
150
151       --no-leading-addr
152              When disassembling, do not print leading addresses.
153
154       --no-print-imm-hex
155              Do not use hex format for immediate values in disassembly output
156              (default).
157
158       --no-show-raw-insn
159              When  disassembling, do not print the raw bytes of each instruc‐
160              tion.
161
162       --offloading
163              Display the content of the LLVM offloading section.
164
165       --prefix=<prefix>
166              When disassembling with the --source option, prepend  prefix  to
167              absolute paths.
168
169       --prefix-strip=<level>
170              When  disassembling  with  the  --source option, strip out level
171              initial directories from absolute paths. This option has no  ef‐
172              fect without --prefix.
173
174       --print-imm-hex
175              Use  hex  format  when  printing immediate values in disassembly
176              output.
177
178       -S, --source
179              When disassembling, display source interleaved with  the  disas‐
180              sembly. Implies --disassemble.
181
182       --show-lma
183              Display  the  LMA  column  when dumping ELF section headers. De‐
184              faults to off unless any section has different VMA and LMAs.
185
186       --start-address=<address>
187              When disassembling, only disassemble from the specified address.
188
189              When printing relocations, only print the  relocations  patching
190              offsets from at least address.
191
192              When  printing  symbols,  only  print symbols with a value of at
193              least address.
194
195       --stop-address=<address>
196              When disassembling, only disassemble up to,  but  not  including
197              the specified address.
198
199              When  printing  relocations, only print the relocations patching
200              offsets up to address.
201
202              When printing symbols, only print symbols with a value up to ad‐
203              dress.
204
205       --symbolize-operands
206              When disassembling, symbolize a branch target operand to print a
207              label instead of a real address.
208
209              When printing a PC-relative global symbol reference, print it as
210              an offset from the leading symbol.
211
212              When  a bb-address-map section is present (i.e., the object file
213              is built with  -fbasic-block-sections=labels),  labels  are  re‐
214              trieved from that section instead.
215
216              Only works with PowerPC objects or X86 linked images.
217
218              Example:
219                     A  non-symbolized  branch instruction with a local target
220                     and pc-relative memory access like
221
222                 cmp eax, dword ptr [rip + 4112]
223                 jge 0x20117e <_start+0x25>
224
225              might become
226
227                 <L0>:
228                   cmp eax, dword ptr <g>
229                   jge      <L0>
230
231       --triple=<string>
232              Target triple to disassemble for, see  --version  for  available
233              targets.
234
235       -w, --wide
236              Ignored for compatibility with GNU objdump.
237
238       --x86-asm-syntax=<style>
239              Deprecated.   When used with --disassemble, choose style of code
240              to emit from X86 backend. Supported values are:
241
242                 att    AT&T-style assembly
243
244                 intel  Intel-style assembly
245
246              The default disassembly style is att.
247
248       -z, --disassemble-zeroes
249              Do not skip blocks of zeroes when disassembling.
250
251       @<FILE>
252              Read  command-line  options  and  commands  from  response  file
253              <FILE>.
254

MACH-O ONLY OPTIONS AND COMMANDS

256       --arch=<architecture>
257              Specify  the  architecture  to  disassemble.  see  --version for
258              available architectures.
259
260       --archive-member-offsets
261              Print the offset to each archive member for Mach-O archives (re‐
262              quires --archive-headers).
263
264       --bind Display binding info
265
266       --data-in-code
267              Display the data in code table.
268
269       --dis-symname=<name>
270              Disassemble just the specified symbol's instructions.
271
272       --dyld_info
273              Print bind and rebase information used by dyld to resolve exter‐
274              nal references in a final linked binary.
275
276       --dylibs-used
277              Display the shared libraries used for linked files.
278
279       --dsym=<string>
280              Use .dSYM file for debug info.
281
282       --dylib-id
283              Display the shared library's ID for dylib files.
284
285       --exports-trie
286              Display exported symbols.
287
288       --function-starts
289              Print the function starts table for Mach-O objects.
290
291       -g     Print line information from debug info if available.
292
293       --full-leading-addr
294              Print the full leading address when disassembling.
295
296       --indirect-symbols
297              Display the indirect symbol table.
298
299       --info-plist
300              Display the info plist section as strings.
301
302       --lazy-bind
303              Display lazy binding info.
304
305       --link-opt-hints
306              Display the linker optimization hints.
307
308       -m, --macho
309              Use Mach-O specific object file parser. Commands and  other  op‐
310              tions may behave differently when used with --macho.
311
312       --no-leading-headers
313              Do not print any leading headers.
314
315       --no-symbolic-operands
316              Do not print symbolic operands when disassembling.
317
318       --non-verbose
319              Display the information for Mach-O objects in non-verbose or nu‐
320              meric form.
321
322       --objc-meta-data
323              Display the Objective-C runtime meta data.
324
325       --private-header
326              Display only the first format specific file header.
327
328       --rebase
329              Display rebasing information.
330
331       --rpaths
332              Display runtime search paths for the binary.
333
334       --universal-headers
335              Display universal headers.
336
337       --weak-bind
338              Display weak binding information.
339

XCOFF ONLY OPTIONS AND COMMANDS

341       --symbol-description
342              Add symbol description to disassembly output.
343

BUGS

345       To         report         bugs,         please         visit         <‐
346       https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>.
347

SEE ALSO

349       llvm-nm(1), llvm-otool(1), llvm-readelf(1), llvm-readobj(1)
350

AUTHOR

352       Maintained by the LLVM Team (https://llvm.org/).
353
355       2003-2023, LLVM Project
356
357
358
359
36015                                2023-07-20                   LLVM-OBJDUMP(1)
Impressum