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

MACH-O ONLY OPTIONS AND COMMANDS

277       --arch=<architecture>
278              Specify the  architecture  to  disassemble.  see  --version  for
279              available architectures.
280
281       --archive-member-offsets
282              Print the offset to each archive member for Mach-O archives (re‐
283              quires --archive-headers).
284
285       --bind Display binding info
286
287       --data-in-code
288              Display the data in code table.
289
290       --dis-symname=<name>
291              Disassemble just the specified symbol's instructions.
292
293       --chained-fixups
294              Print chained fixup information.
295
296       --dyld-info
297              Print bind and rebase information used by dyld to resolve exter‐
298              nal references in a final linked binary.
299
300       --dylibs-used
301              Display the shared libraries used for linked files.
302
303       --dsym=<string>
304              Use .dSYM file for debug info.
305
306       --dylib-id
307              Display the shared library's ID for dylib files.
308
309       --exports-trie
310              Display exported symbols.
311
312       --function-starts [=<addrs|names|both>]
313              Print the function starts table for Mach-O objects. Either addrs
314              (default) to print only the addresses  of  functions,  names  to
315              print  only the names of the functions (when available), or both
316              to print the names beside the addresses.
317
318       -g     Print line information from debug info if available.
319
320       --full-leading-addr
321              Print the full leading address when disassembling.
322
323       --indirect-symbols
324              Display the indirect symbol table.
325
326       --info-plist
327              Display the info plist section as strings.
328
329       --lazy-bind
330              Display lazy binding info.
331
332       --link-opt-hints
333              Display the linker optimization hints.
334
335       -m, --macho
336              Use Mach-O specific object file parser. Commands and  other  op‐
337              tions may behave differently when used with --macho.
338
339       --no-leading-headers
340              Do not print any leading headers.
341
342       --no-symbolic-operands
343              Do not print symbolic operands when disassembling.
344
345       --non-verbose
346              Display the information for Mach-O objects in non-verbose or nu‐
347              meric form.
348
349       --objc-meta-data
350              Display the Objective-C runtime meta data.
351
352       --private-header
353              Display only the first format specific file header.
354
355       --rebase
356              Display rebasing information.
357
358       --rpaths
359              Display runtime search paths for the binary.
360
361       --universal-headers
362              Display universal headers.
363
364       --weak-bind
365              Display weak binding information.
366

XCOFF ONLY OPTIONS AND COMMANDS

368       --symbol-description
369              Add symbol description to disassembly output.
370

BUGS

372       To         report         bugs,         please         visit         <‐
373       https://github.com/llvm/llvm-project/labels/tools:llvm-objdump/>.
374

SEE ALSO

376       llvm-nm(1), llvm-otool(1), llvm-readelf(1), llvm-readobj(1)
377

AUTHOR

379       Maintained by the LLVM Team (https://llvm.org/).
380
382       2003-2023, LLVM Project
383
384
385
386
38716                                2023-07-20                   LLVM-OBJDUMP(1)
Impressum