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 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       -v, --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

OPTIONS

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 52 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. Available options:
119
120reg-names-std: ARM only (default). Print in ARM 's instruction
121                set documentation, with r13/r14/r15 replaced by sp/lr/pc.
122
123reg-names-raw: ARM only. Use r followed by the  register  num‐
124                ber.
125
126no-aliases:  AArch64  and  RISC-V  only. Print raw instruction
127                mnemonic instead of pesudo instruction mnemonic.
128
129numeric: RISC-V only. Print raw register names instead of  ABI
130                mnemonic. (e.g. print x1 instead of ra)
131
132att: x86 only (default). Print in the AT&T syntax.
133
134intel: x86 only. Print in the intel syntax.
135
136       --mcpu=<cpu-name>
137              Target  a specific CPU type for disassembly. Specify --mcpu=help
138              to display available CPUs.
139
140       --mattr=<a1,+a2,-a3,...>
141              Enable/disable target-specific attributes. Specify  --mattr=help
142              to display the available attributes.
143
144       --no-leading-addr
145              When disassembling, do not print leading addresses.
146
147       --no-print-imm-hex
148              Do not use hex format for immediate values in disassembly output
149              (default).
150
151       --no-show-raw-insn
152              When disassembling, do not print the raw bytes of each  instruc‐
153              tion.
154
155       --prefix=<prefix>
156              When  disassembling  with the --source option, prepend prefix to
157              absolute paths.
158
159       --prefix-strip=<level>
160              When disassembling with the --source  option,  strip  out  level
161              initial  directories from absolute paths. This option has no ef‐
162              fect without --prefix.
163
164       --print-imm-hex
165              Use hex format when printing  immediate  values  in  disassembly
166              output.
167
168       -S, --source
169              When  disassembling,  display source interleaved with the disas‐
170              sembly. Implies --disassemble.
171
172       --show-lma
173              Display the LMA column when dumping  ELF  section  headers.  De‐
174              faults to off unless any section has different VMA and LMAs.
175
176       --start-address=<address>
177              When disassembling, only disassemble from the specified address.
178
179              When  printing  relocations, only print the relocations patching
180              offsets from at least address.
181
182              When printing symbols, only print symbols with  a  value  of  at
183              least address.
184
185       --stop-address=<address>
186              When  disassembling,  only  disassemble up to, but not including
187              the specified address.
188
189              When printing relocations, only print the  relocations  patching
190              offsets up to address.
191
192              When printing symbols, only print symbols with a value up to ad‐
193              dress.
194
195       --symbolize-operands
196              When disassembling, symbolize a branch target operand to print a
197              label instead of a real address.
198
199              When printing a PC-relative global symbol reference, print it as
200              an offset from the leading symbol.
201
202              Only works with an X86 linked image.
203
204              Example:
205                     A non-symbolized branch instruction with a  local  target
206                     and pc-relative memory access like
207
208                 cmp eax, dword ptr [rip + 4112]
209                 jge 0x20117e <_start+0x25>
210
211              might become
212
213                 <L0>:
214                   cmp eax, dword ptr <g>
215                   jge      <L0>
216
217       --triple=<string>
218              Target  triple  to  disassemble for, see --version for available
219              targets.
220
221       -w, --wide
222              Ignored for compatibility with GNU objdump.
223
224       --x86-asm-syntax=<style>
225              Deprecated.  When used with --disassemble, choose style of  code
226              to emit from X86 backend. Supported values are:
227
228                 att    AT&T-style assembly
229
230                 intel  Intel-style assembly
231
232              The default disassembly style is att.
233
234       -z, --disassemble-zeroes
235              Do not skip blocks of zeroes when disassembling.
236
237       @<FILE>
238              Read  command-line  options  and  commands  from  response  file
239              <FILE>.
240

MACH-O ONLY OPTIONS AND COMMANDS

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

XCOFF ONLY OPTIONS AND COMMANDS

323       --symbol-description
324              Add symbol description to disassembly output.
325

BUGS

327       To report bugs, please visit <https://bugs.llvm.org/>.
328

SEE ALSO

330       llvm-nm(1), llvm-otool(1), llvm-readelf(1), llvm-readobj(1)
331

AUTHOR

333       Maintained by the LLVM Team (https://llvm.org/).
334
336       2003-2022, LLVM Project
337
338
339
340
34113                                2022-02-02                   LLVM-OBJDUMP(1)
Impressum