1.\" Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2.\" See https://llvm.org/LICENSE.txt for license information.
3.\" SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4.\"
5.Dd December 19, 2018
6.Dt LLVM-OBJDUMP 1
7.Os
8.Sh NAME
9.Nm llvm-objdump
10.Nd LLVM object file dumper
11.Sh SYNOPSIS
12.Nm llvm-objdump
13.Op Ar options
14.Ar objfile ...
15.Sh DESCRIPTION
16.Nm
17prints the contents of object files and final linked images named on the
18command line.
19If no file name is specified,
20.Nm
21will attempt to read from
22.Pa a.out .
23If
24.Pa -
25is used as a file name,
26.Nm
27will process a file on its standard input stream.
28.Nm
29accepts many of the same command line arguments as GNU objdump.
30.Sh OPTIONS
31.Ss General Options
32.Bl -tag -width indent
33.It Fl -aarch64-neon-syntax Ns = Ns Ar value
34Choose style of NEON code to emit from AArch64 backend.
35.Ar value
36may be one of:
37.Bl -tag -width indent
38.It generic
39Generic NEON assembly
40.It apple
41Apple-style NEON assembly
42.El
43.It Fl -arch Ns = Ns Ar value
44Choose architecture(s) from a Mach-O file to dump
45.It Fl -arch-name Ns = Ns ar arch
46Target arch to disassemble for.
47See
48.Fl -version
49for available targets.
50.It Fl -bind
51Display mach-o binding info.
52.It Fl -color
53Use colored syntax highlighting.
54Default autodetect.
55.It Fl -disassemble
56Display assembler mnemonics for machine instructions.
57.It Fl -disassemble-all
58Display assembler mnemonics for the machine instruction in all sections.
59.It Fl -dsym Ns = Ns Ar file
60Use
61.Ar file
62for debug info.
63.It Fl -dwarf Ns = Ns Ar sections
64Dump of dwarf debug sections.
65.Bl -tag -width indent
66.It frames
67.Dv .debug_frame
68.El
69.It Fl -exports-trie
70Display mach-o exported symbols.
71.It Fl -fault-map-section
72Display contents of faultmap section.
73.It Fl -filter-print-funcs Ns = Ns Ar functions
74Only print IR for functions whose name match
75.Ar functions
76for all print-[before|after][-all] options.
77.It Fl -full-leading-addr
78Print full leading address.
79.It Fl g
80Print line information from debug info if available.
81.It Fl h , -headers , -section-headers
82Display summaries of the headers for each section.
83.It Fl -help
84Display available options.
85Use
86.Fl -help-hidden
87for more.
88.It Fl -lazy-bind
89Display mach-o lazy binding info.
90.It Fl -line-numbers
91Display source line numbers with disassembly.
92Implies disassemble object.
93.It Fl -macho
94Use MachO specific object file parser.
95.It Fl -mattr Ns = Ns Ar attribute ...
96Target specific attributes.
97.It Fl -mcpu Ns = Ns Ar CPU
98Target a specific cpu type.
99Use
100.Fl mcpu Ns = Ns help
101for details.
102.It Fl -no-leading-addr
103Print no leading address.
104.It Fl -no-leading-headers
105Print no leading headers.
106.It Fl -no-show-raw-insn
107When disassembling instructions, do not print the instruction bytes.
108.It Fl -offloading
109Display the content of the LLVM offloading section.
110.It Fl -prefix Ns = Ns Ar PREFIX
111When disassembling, add
112.Ar PREFIX
113to absolute paths.
114.It Fl -prefix-strip Ns = Ns Ar LEVEL
115When disassembling, strip out
116.Ar LEVEL
117initial directories from absolute paths. This option has no effect without
118.Fl -prefix Ns = Ns PREFIX .
119.It Fl -print-imm-hex
120Use hex format for immediate values.
121.It Fl -private-header
122Display only the first format specific file header.
123.It Fl -private-headers
124Display format specific file headers.
125.It Fl r
126Display the relocation entries in the file.
127.It Fl -raw-clang-ast
128Dump the raw binary contents of the clang AST section.
129.It Fl -rebase
130Display mach-o rebasing info.
131.It Fl -reverse-iterate
132Reverse iterate.
133.It Fl s
134Display the content of each section.
135.It Fl -section Ns = Ns Ar section
136Operate on the specified sections only.
137With
138.Fl -macho
139dump segment,section.
140.It Fl -source
141Display source inline with disassembly.
142Implies disassemble object.
143.It Fl -start-address Ns = Ns Ar address
144Disassemble beginning at
145.Ar address .
146.It Fl -stop-address Ns = Ns Ar address
147Stop disassembly at
148.Ar address .
149.It Fl t
150Display the symbol table.
151.It Fl -triple Ns = Ns Ar triple
152Target triple to disassemble for.
153See
154.Fl -version
155for available targets.
156.It Fl -unwind-info
157Display unwind information.
158.It Fl -version
159Display the version of this program.
160.It Fl -weak-bind
161Display mach-o weak binding info.
162.It Fl -x86-asm-syntax Ns = Ns Ar syntax
163Choose style of code to emit from X86 backend.
164.Bl -tag -width indent
165.It att
166Emit AT&T-style assembly.
167.It intel
168Emit Intel-style assembly.
169.El
170.El
171.Ss Mach-O Options
172There are a number of options specific to the Mach-O format.
173These are used in combination with the
174.Fl -macho
175option.
176.Bl -tag -width indent
177.It Fl -archive-headers
178Print archive headers for Mach-O archives.
179.It Fl -archive-member-offsets
180Print the offset to each archive member for Mach-O archives.
181Requires
182.Fl -macho
183and
184.Fl -archive-headers .
185.It Fl -data-in-code
186Print the data in code table for Mach-O objects.
187.It Fl -dis-symname Ns = Ns Ar symbol
188Disassemble just
189.Ar symbol 's
190instructions.
191.It Fl -dylib-id
192Print the shared library's id for the dylib Mach-O file.
193.It Fl -dylibs-used
194Print the shared libraries used for linked Mach-O files.
195.It Fl -indirect-symbols
196Print indirect symbol table for Mach-O objects.
197.It Fl -info-plist
198Print the info plist section as strings for Mach-O objects.
199.It Fl -link-opt-hints
200Print the linker optimization hints for Mach-O objects.
201.It Fl -no-symbolic-operands
202do not symbolic operands when disassembling.
203.It Fl -non-verbose
204Print the info for Mach-O objects in non-verbose or numeric form.
205.It Fl -objc-meta-data
206Print the Objective-C runtime meta data for Mach-O files.
207.It Fl -universal-headers
208Print Mach-O universal headers.
209.El
210