llvm-objdump.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. llvm-objdump - LLVM's object file dumper
  2. ========================================
  3. SYNOPSIS
  4. --------
  5. :program:`llvm-objdump` [*commands*] [*options*] [*filenames...*]
  6. DESCRIPTION
  7. -----------
  8. The :program:`llvm-objdump` utility prints the contents of object files and
  9. final linked images named on the command line. If no file name is specified,
  10. :program:`llvm-objdump` will attempt to read from *a.out*. If *-* is used as a
  11. file name, :program:`llvm-objdump` will process a file on its standard input
  12. stream.
  13. COMMANDS
  14. --------
  15. At least one of the following commands are required, and some commands can be
  16. combined with other commands:
  17. .. option:: -a, --archive-headers
  18. Display the information contained within an archive's headers.
  19. .. option:: -d, --disassemble
  20. Display assembler mnemonics for the machine instructions. Disassembles all
  21. text sections found in the input file(s) by default.
  22. .. option:: -D, --disassemble-all
  23. Display assembler mnemonics for the machine instructions. Disassembles all
  24. sections found in the input file(s) by default.
  25. .. option:: --disassemble-functions=<func1[,func2,...]>
  26. Disassemble only the specified symbols. Implies :option:`--disassemble`.
  27. .. option:: --dwarf=<value>
  28. Dump the specified DWARF debug sections. The supported values are:
  29. `frames` - .debug_frame
  30. .. option:: -f, --file-headers
  31. Display the contents of the overall file header.
  32. .. option:: --fault-map-section
  33. Display the content of the fault map section.
  34. .. option:: -h, --headers, --section-headers
  35. Display summaries of the headers for each section.
  36. .. option:: --help
  37. Display usage information and exit. Does not stack with other commands.
  38. .. option:: -p, --private-headers
  39. Display format-specific file headers.
  40. .. option:: -r, --reloc
  41. Display the relocation entries in the file.
  42. .. option:: -R, --dynamic-reloc
  43. Display the dynamic relocation entries in the file.
  44. .. option:: --raw-clang-ast
  45. Dump the raw binary contents of the clang AST section.
  46. .. option:: -s, --full-contents
  47. Display the contents of each section.
  48. .. option:: -t, --syms
  49. Display the symbol table.
  50. .. option:: -u, --unwind-info
  51. Display the unwind info of the input(s).
  52. .. option:: --version
  53. Display the version of this program. Does not stack with other commands.
  54. .. option:: -x, --all-headers
  55. Display all available header information. Equivalent to specifying
  56. :option:`--archive-headers`, :option:`--file-headers`,
  57. :option:`--private-headers`, :option:`--reloc`, :option:`--section-headers`,
  58. and :option:`--syms`.
  59. OPTIONS
  60. -------
  61. :program:`llvm-objdump` supports the following options:
  62. .. option:: --adjust-vma=<offset>
  63. Increase the displayed address in disassembly or section header printing by
  64. the specified offset.
  65. .. option:: --arch-name=<string>
  66. Specify the target architecture when disassembling. Use :option:``--version``
  67. for a list of available targets.
  68. .. option:: -C, --demangle
  69. Demangle symbol names in the output.
  70. .. option:: -j, --section=<section1[,section2,...]>
  71. Perform the specified command(s) on the specified section(s) only. For Mach-O
  72. use `segment,section` to specify the section name.
  73. .. option:: -l, --line-numbers
  74. When disassembling, display source line numbers with disassembly. Implies
  75. :option:`--disassemble`.
  76. .. option:: -M, --disassembler-options=<opt1[,opt2,...]>
  77. Pass target-specific disassembler options. Currently supported for ARM targets
  78. only. Available options are ``reg-names-std`` and ``reg-names-raw``.
  79. .. option:: --mcpu=<cpu-name>
  80. Target a specific CPU type for disassembly. Specify ``--mcpu=help`` to display
  81. available CPUs.
  82. .. option:: --mattr=<a1,+a2,-a3,...>
  83. Enable/disable target-specific attributes. Specify ``--mcpu=help`` to display
  84. the available attributes.
  85. .. option:: --no-leading-addr
  86. When disassembling, do not print the leading address in the disassembly
  87. output.
  88. .. option:: --no-show-raw-insn
  89. When disassembling instructions, do not print the raw bytes of the
  90. instruction.
  91. .. option:: --print-imm-hex
  92. Use hex format when printing immediate values in disassembly output.
  93. .. option:: -S, --source
  94. When disassembling, display source inlined with the disassembly.
  95. Implies :option:`--disassemble`.
  96. .. option:: --show-lma
  97. Display the LMA column when dumping ELF section headers. Defaults to off
  98. unless any section has different VMA and LMAs.
  99. .. option:: --start-address=<address>
  100. When disassembling, only disassemble from the specified address.
  101. When printing relocations, only print the relocations patching offsets from at least ``address``.
  102. When printing symbols, only print symbols with a value of at least ``address``.
  103. .. option:: --stop-address=<address>
  104. When disassembling, only disassemble up to, but not including the specified address.
  105. When printing relocations, only print the relocations patching offsets up to ``address``.
  106. When printing symbols, only print symbols with a value up to ``address``.
  107. .. option:: --triple=<string>
  108. Target triple to disassemble for, see ``--version`` for available targets.
  109. .. option:: -w, --wide
  110. Ignored for compatibility with GNU objdump.
  111. .. option:: --x86-asm-syntax=<style>
  112. When used with the ``--disassemble`` option, choose style of code to emit from
  113. X86 backend. Supported values are:
  114. .. option:: att
  115. AT&T-style assembly
  116. .. option:: intel
  117. Intel-style assembly
  118. The default disassembly style is **att**.
  119. .. option:: -z, --disassemble-zeroes
  120. Do not skip blocks of zeroes when disassembling.
  121. MACH-O ONLY OPTIONS AND COMMANDS
  122. --------------------------------
  123. .. option:: --arch=<architecture>
  124. Specify the architecture to disassemble. see ``--version`` for available
  125. architectures.
  126. .. option:: --archive-member-offsets
  127. Print the offset to each archive member for Mach-O archives (requires
  128. :option:`--archive-headers`).
  129. .. option:: --bind
  130. Display binding info
  131. .. option:: --cfg
  132. Create a CFG for every symbol in the object file and write it to a graphviz
  133. file.
  134. .. option:: --data-in-code
  135. Display the data in code table.
  136. .. option:: --dis-symname=<name>
  137. Disassemble just the specified symbol's instructions.
  138. .. option:: --dylibs-used
  139. Display the shared libraries used for linked files.
  140. .. option:: --dsym=<string>
  141. Use .dSYM file for debug info.
  142. .. option:: --dylib-id
  143. Display the shared library's ID for dylib files.
  144. .. option:: --exports-trie
  145. Display exported symbols.
  146. .. option:: -g
  147. Print line information from debug info if available.
  148. .. option:: --full-leading-addr
  149. Print the full leading address when disassembling.
  150. .. option:: --indirect-symbols
  151. Display the indirect symbol table.
  152. .. option:: --info-plist
  153. Display the info plist section as strings.
  154. .. option:: --lazy-bind
  155. Display lazy binding info.
  156. .. option:: --link-opt-hints
  157. Display the linker optimization hints.
  158. .. option:: -m, --macho
  159. Use Mach-O specific object file parser. Commands and other options may behave
  160. differently when used with ``--macho``.
  161. .. option:: --no-leading-headers
  162. Do not print any leading headers.
  163. .. option:: --no-symbolic-operands
  164. Do not print symbolic operands when disassembling.
  165. .. option:: --non-verbose
  166. Display the information for Mach-O objects in non-verbose or numeric form.
  167. .. option:: --objc-meta-data
  168. Display the Objective-C runtime meta data.
  169. .. option:: --private-header
  170. Display only the first format specific file header.
  171. .. option:: --rebase
  172. Display rebasing information.
  173. .. option:: --universal-headers
  174. Display universal headers.
  175. .. option:: --weak-bind
  176. Display weak binding information.
  177. BUGS
  178. ----
  179. To report bugs, please visit <http://llvm.org/bugs/>.
  180. SEE ALSO
  181. --------
  182. :manpage:`llvm-nm(1)`, :manpage:`llvm-readobj(1)`