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.
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              This  operation  is only currently supported for COFF and Mach-O
78              object files.
79
80       -v, --version
81              Display the version of the  llvm-objdump  executable.  Does  not
82              stack with other commands.
83
84       -x, --all-headers
85              Display all available header information. Equivalent to specify‐
86              ing   --archive-headers,   --file-headers,    --private-headers,
87              --reloc, --section-headers, and --syms.
88

OPTIONS

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

MACH-O ONLY OPTIONS AND COMMANDS

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

XCOFF ONLY OPTIONS AND COMMANDS

326       --symbol-description
327              Add symbol description to disassembly output.
328

BUGS

330       To         report         bugs,         please         visit         <‐
331       https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>.
332

SEE ALSO

334       llvm-nm(1), llvm-otool(1), llvm-readelf(1), llvm-readobj(1)
335

AUTHOR

337       Maintained by the LLVM Team (https://llvm.org/).
338
340       2003-2022, LLVM Project
341
342
343
344
34514                                2022-09-12                   LLVM-OBJDUMP(1)
Impressum