Skip to content

Commit 4a68586

Browse files
committedAug 8, 2018
Add a CommandGuide for llvm-objdump
Summary: Add a CommandGuide for llvm-objdump summarizing its usage along with some general context. Reviewers: beanz Reviewed By: beanz Subscribers: Eugene.Zelenko, llvm-commits Differential Revision: https://reviews.llvm.org/D50034 llvm-svn: 339250
1 parent cd02f31 commit 4a68586

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed
 

‎llvm/docs/CommandGuide/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Basic Commands
2323
llvm-ar
2424
llvm-lib
2525
llvm-nm
26+
llvm-objdump
2627
llvm-config
2728
llvm-diff
2829
llvm-cov
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
llvm-objdump - LLVM's object file dumper
2+
========================================
3+
4+
SYNOPSIS
5+
--------
6+
7+
:program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]
8+
9+
DESCRIPTION
10+
-----------
11+
The :program:`llvm-objdump` utility prints the contents of object files and
12+
final linked images named on the command line. If no file name is specified,
13+
:program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a
14+
file name, :program:`llvm-objdump` will process a file on its standard input
15+
stream.
16+
17+
COMMANDS
18+
--------
19+
At least one of the following commands are required, and some commands can be combined with other commands:
20+
21+
.. option:: -disassemble
22+
23+
Display assembler mnemonics for the machine instructions
24+
25+
.. option:: -help
26+
27+
Display usage information and exit. Does not stack with other commands.
28+
29+
.. option:: -r
30+
31+
Display the relocation entries in the file.
32+
33+
.. option:: -s
34+
35+
Display the content of each section.
36+
37+
.. option:: -section-headers
38+
39+
Display summaries of the headers for each section.
40+
41+
.. option:: -t
42+
43+
Display the symbol table.
44+
45+
.. option:: -version
46+
47+
Display the version of this program. Does not stack with other commands.
48+
49+
OPTIONS
50+
-------
51+
:program:`llvm-objdump` supports the following options:
52+
53+
.. option:: -arch=<architecture>
54+
55+
Specify the architecture to disassemble. see -version for available
56+
architectures.
57+
58+
.. option:: -cfg
59+
60+
Create a CFG for every symbol in the object file and write it to a graphviz
61+
file (Mach-O-only).
62+
63+
.. option:: -dsym=<string>
64+
65+
Use .dSYM file for debug info.
66+
67+
.. option:: -g
68+
69+
Print line information from debug info if available.
70+
71+
.. option:: -macho
72+
73+
Use Mach-O specific object file parser.
74+
75+
.. option:: -mattr=<a1,+a2,-a3,...>
76+
77+
Target specific attributes.
78+
79+
.. option:: -mc-x86-disable-arith-relaxation
80+
81+
Disable relaxation of arithmetic instruction for X86.
82+
83+
.. option:: -stats
84+
85+
Enable statistics output from program.
86+
87+
.. option:: -triple=<string>
88+
89+
Target triple to disassemble for, see -version for available targets.
90+
91+
.. option:: -x86-asm-syntax=<style>
92+
93+
When used with the ``-disassemble`` option, choose style of code to emit from
94+
X86 backend. Supported values are:
95+
96+
.. option:: att
97+
98+
AT&T-style assembly
99+
100+
.. option:: intel
101+
102+
Intel-style assembly
103+
104+
105+
The default disassembly style is **att**.
106+
107+
BUGS
108+
----
109+
110+
To report bugs, please visit <http://llvm.org/bugs/>.
111+
112+
SEE ALSO
113+
--------
114+
115+
:manpage:`llvm-nm(1)`

‎llvm/docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,6 @@
257257
# Pygment lexer are sometimes out of date (when parsing LLVM for example) or
258258
# wrong. Suppress the warning so the build doesn't abort.
259259
suppress_warnings = [ 'misc.highlighting_failure' ]
260+
261+
# Direct html-ified man pages to llvm.org
262+
manpages_url = 'https://llvm.org/docs/CommandGuide/{page}.html'

0 commit comments

Comments
 (0)
Please sign in to comment.