summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide/llvm-objdump.rst
blob: 0d0291520475d4b17b21459ece7df3d3cefa20bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
llvm-objdump - LLVM's object file dumper
========================================

SYNOPSIS
--------

:program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]

DESCRIPTION
-----------
The :program:`llvm-objdump` utility prints the contents of object files and
final linked images named on the command line. If no file name is specified,
:program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a
file name, :program:`llvm-objdump` will process a file on its standard input
stream.

COMMANDS
--------
At least one of the following commands are required, and some commands can be combined with other commands:

.. option:: -disassemble

  Display assembler mnemonics for the machine instructions
 
.. option:: -help

  Display usage information and exit. Does not stack with other commands.

.. option:: -r

  Display the relocation entries in the file.

.. option:: -s

  Display the content of each section.

.. option:: -section-headers

  Display summaries of the headers for each section.

.. option:: -t

  Display the symbol table.

.. option:: -version

  Display the version of this program. Does not stack with other commands.
  
OPTIONS
-------
:program:`llvm-objdump` supports the following options:

.. option:: -arch=<architecture>

  Specify the architecture to disassemble. see -version for available
  architectures.

.. option:: -cfg

  Create a CFG for every symbol in the object file and write it to a graphviz
  file (Mach-O-only).

.. option:: -dsym=<string>

  Use .dSYM file for debug info.

.. option:: -g

  Print line information from debug info if available.

.. option:: -macho

  Use Mach-O specific object file parser.

.. option:: -mattr=<a1,+a2,-a3,...>

  Target specific attributes.
  
.. option:: -mc-x86-disable-arith-relaxation

  Disable relaxation of arithmetic instruction for X86.

.. option:: -stats

  Enable statistics output from program.
  
.. option:: -triple=<string>

  Target triple to disassemble for, see -version for available targets.
  
.. option:: -x86-asm-syntax=<style>

  When used with the ``-disassemble`` option, choose style of code to emit from
  X86 backend. Supported values are:

   .. option:: att
   
    AT&T-style assembly
   
   .. option:: intel
   
    Intel-style assembly

   
  The default disassembly style is **att**. 

BUGS
----

To report bugs, please visit <http://llvm.org/bugs/>.

SEE ALSO
--------

:manpage:`llvm-nm(1)`
OpenPOWER on IntegriCloud