Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 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 | -------- |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 19 | At least one of the following commands are required, and some commands can be |
| 20 | combined with other commands: |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 21 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 22 | .. option:: -d, -disassemble |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 23 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 24 | Display assembler mnemonics for the machine instructions. Disassembles all |
| 25 | text sections found in the input file(s). |
| 26 | |
| 27 | .. option:: -D, -disassemble-all |
| 28 | |
| 29 | Display assembler mnemonics for the machine instructions. Disassembles all |
| 30 | sections found in the input file(s). |
| 31 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 32 | .. option:: -help |
| 33 | |
| 34 | Display usage information and exit. Does not stack with other commands. |
| 35 | |
| 36 | .. option:: -r |
| 37 | |
| 38 | Display the relocation entries in the file. |
| 39 | |
| 40 | .. option:: -s |
| 41 | |
| 42 | Display the content of each section. |
| 43 | |
| 44 | .. option:: -section-headers |
| 45 | |
| 46 | Display summaries of the headers for each section. |
| 47 | |
| 48 | .. option:: -t |
| 49 | |
| 50 | Display the symbol table. |
| 51 | |
| 52 | .. option:: -version |
| 53 | |
| 54 | Display the version of this program. Does not stack with other commands. |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 55 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 56 | OPTIONS |
| 57 | ------- |
| 58 | :program:`llvm-objdump` supports the following options: |
| 59 | |
| 60 | .. option:: -arch=<architecture> |
| 61 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 62 | Specify the architecture to disassemble. see ``-version`` for available |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 63 | architectures. |
| 64 | |
| 65 | .. option:: -cfg |
| 66 | |
| 67 | Create a CFG for every symbol in the object file and write it to a graphviz |
| 68 | file (Mach-O-only). |
| 69 | |
| 70 | .. option:: -dsym=<string> |
| 71 | |
| 72 | Use .dSYM file for debug info. |
| 73 | |
| 74 | .. option:: -g |
| 75 | |
| 76 | Print line information from debug info if available. |
| 77 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 78 | .. option:: -m, -macho |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 79 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 80 | Use Mach-O specific object file parser. Commands and other options may behave |
| 81 | differently when used with ``-macho``. |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 82 | |
| 83 | .. option:: -mattr=<a1,+a2,-a3,...> |
| 84 | |
| 85 | Target specific attributes. |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 86 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 87 | .. option:: -mc-x86-disable-arith-relaxation |
| 88 | |
| 89 | Disable relaxation of arithmetic instruction for X86. |
| 90 | |
| 91 | .. option:: -stats |
| 92 | |
| 93 | Enable statistics output from program. |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 94 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 95 | .. option:: -triple=<string> |
| 96 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 97 | Target triple to disassemble for, see ``-version`` for available targets. |
| 98 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 99 | .. option:: -x86-asm-syntax=<style> |
| 100 | |
| 101 | When used with the ``-disassemble`` option, choose style of code to emit from |
| 102 | X86 backend. Supported values are: |
| 103 | |
| 104 | .. option:: att |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 105 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 106 | AT&T-style assembly |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 107 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 108 | .. option:: intel |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 109 | |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 110 | Intel-style assembly |
| 111 | |
Michael Trent | e9414c2 | 2019-01-15 20:41:30 +0000 | [diff] [blame] | 112 | |
| 113 | The default disassembly style is **att**. |
Michael Trent | c1affcd | 2018-08-08 14:39:22 +0000 | [diff] [blame] | 114 | |
| 115 | BUGS |
| 116 | ---- |
| 117 | |
| 118 | To report bugs, please visit <http://llvm.org/bugs/>. |
| 119 | |
| 120 | SEE ALSO |
| 121 | -------- |
| 122 | |
| 123 | :manpage:`llvm-nm(1)` |