xref: /freebsd/usr.bin/clang/llvm-objdump/llvm-objdump.1 (revision 62cfcf62f627e5093fb37026a6d8c98e4d2ef04c)
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 -print-imm-hex
109Use hex format for immediate values.
110.It Fl -private-header
111Display only the first format specific file header.
112.It Fl -private-headers
113Display format specific file headers.
114.It Fl r
115Display the relocation entries in the file.
116.It Fl -raw-clang-ast
117Dump the raw binary contents of the clang AST section.
118.It Fl -rebase
119Display mach-o rebasing info.
120.It Fl -reverse-iterate
121Reverse iterate.
122.It Fl s
123Display the content of each section.
124.It Fl -section Ns = Ns Ar section
125Operate on the specified sections only.
126With
127.Fl -macho
128dump segment,section.
129.It Fl -source
130Display source inline with disassembly.
131Implies disassmble object.
132.It Fl -start-address Ns = Ns Ar address
133Disassemble beginning at
134.Ar address .
135.It Fl -stop-address Ns = Ns Ar address
136Stop disassembly at
137.Ar address .
138.It Fl t
139Display the symbol table.
140.It Fl -triple Ns = Ns Ar triple
141Target triple to disassemble for.
142See
143.Fl -version
144for available targets.
145.It Fl -unwind-info
146Display unwind information.
147.It Fl -version
148Display the version of this program.
149.It Fl -weak-bind
150Display mach-o weak binding info.
151.It Fl -x86-asm-syntax Ns = Ns Ar syntax
152Choose style of code to emit from X86 backend.
153.Bl -tag -width indent
154.It att
155Emit AT&T-style assembly.
156.It intel
157Emit Intel-style assembly.
158.El
159.El
160.Ss Mach-O Options
161There are a number of options specific to the Mach-O format.
162These are used in combination with the
163.Fl -macho
164option.
165.Bl -tag -width indent
166.It Fl -archive-headers
167Print archive headers for Mach-O archives.
168.It Fl -archive-member-offsets
169Print the offset to each archive member for Mach-O archives.
170Requires
171.Fl -macho
172and
173.Fl -archive-headers .
174.It Fl -data-in-code
175Print the data in code table for Mach-O objects.
176.It Fl -dis-symname Ns = Ns Ar symbol
177Disassemble just
178.Ar symbol 's
179instructions.
180.It Fl -dylib-id
181Print the shared library's id for the dylib Mach-O file.
182.It Fl -dylibs-used
183Print the shared libraries used for linked Mach-O files.
184.It Fl -indirect-symbols
185Print indirect symbol table for Mach-O objects.
186.It Fl -info-plist
187Print the info plist section as strings for Mach-O objects.
188.It Fl -link-opt-hints
189Print the linker optimization hints for Mach-O objects.
190.It Fl -no-symbolic-operands
191do not symbolic operands when disassembling.
192.It Fl -non-verbose
193Print the info for Mach-O objects in non-verbose or numeric form.
194.It Fl -objc-meta-data
195Print the Objective-C runtime meta data for Mach-O files.
196.It Fl -universal-headers
197Print Mach-O universal headers.
198.El
199