llvm-readobj.rst 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. llvm-readobj - LLVM Object Reader
  2. =================================
  3. .. program:: llvm-readobj
  4. SYNOPSIS
  5. --------
  6. :program:`llvm-readobj` [*options*] [*input...*]
  7. DESCRIPTION
  8. -----------
  9. The :program:`llvm-readobj` tool displays low-level format-specific information
  10. about one or more object files.
  11. If ``input`` is "``-``" or omitted, :program:`llvm-readobj` reads from standard
  12. input. Otherwise, it will read from the specified ``filenames``.
  13. DIFFERENCES TO LLVM-READELF
  14. ---------------------------
  15. :program:`llvm-readelf` is an alias for the :manpage:`llvm-readobj` tool with a
  16. slightly different command-line interface and output that is GNU compatible.
  17. Following is a list of differences between :program:`llvm-readelf` and
  18. :program:`llvm-readobj`:
  19. - :program:`llvm-readelf` uses `GNU` for the :option:`--elf-output-style` option
  20. by default. :program:`llvm-readobj` uses `LLVM`.
  21. - :program:`llvm-readelf` allows single-letter grouped flags (e.g.
  22. ``llvm-readelf -SW`` is the same as ``llvm-readelf -S -W``).
  23. :program:`llvm-readobj` does not allow grouping.
  24. - :program:`llvm-readelf` provides :option:`-s` as an alias for
  25. :option:`--symbols`, for GNU :program:`readelf` compatibility, whereas it is
  26. an alias for :option:`--section-headers` in :program:`llvm-readobj`.
  27. - :program:`llvm-readobj` provides ``-t`` as an alias for :option:`--symbols`.
  28. :program:`llvm-readelf` does not.
  29. - :program:`llvm-readobj` provides ``--sr``, ``--sd``, ``--st`` and ``--dt`` as
  30. aliases for :option:`--section-relocations`, :option:`--section-data`,
  31. :option:`--section-symbols` and :option:`--dyn-symbols` respectively.
  32. :program:`llvm-readelf` does not provide these aliases, to avoid conflicting
  33. with grouped flags.
  34. GENERAL AND MULTI-FORMAT OPTIONS
  35. --------------------------------
  36. These options are applicable to more than one file format, or are unrelated to
  37. file formats.
  38. .. option:: --all
  39. Equivalent to specifying all the main display options relevant to the file
  40. format.
  41. .. option:: --addrsig
  42. Display the address-significance table.
  43. .. option:: --color
  44. Use colors in the output for warnings and errors.
  45. .. option:: --expand-relocs
  46. When used with :option:`--relocations`, display each relocation in an expanded
  47. multi-line format.
  48. .. option:: --file-headers, -h
  49. Display file headers.
  50. .. option:: --headers, -e
  51. Equivalent to setting: :option:`--file-headers`, :option:`--program-headers`,
  52. and :option:`--sections`.
  53. .. option:: --help
  54. Display a summary of command line options.
  55. .. option:: --help-list
  56. Display an uncategorized summary of command line options.
  57. .. option:: --hex-dump=<section[,section,...]>, -x
  58. Display the specified section(s) as hexadecimal bytes. ``section`` may be a
  59. section index or section name.
  60. .. option:: --needed-libs
  61. Display the needed libraries.
  62. .. option:: --relocations, --relocs, -r
  63. Display the relocation entries in the file.
  64. .. option:: --sections, --section-headers, -s, -S
  65. Display all sections.
  66. .. option:: --section-data, --sd
  67. When used with :option:`--sections`, display section data for each section shown.
  68. .. option:: --section-relocations, --sr
  69. When used with :option:`--sections`, display relocations for each section shown.
  70. .. option:: --section-symbols, --st
  71. When used with :option:`--sections`, display symbols for each section shown.
  72. .. option:: --stackmap
  73. Display contents of the stackmap section.
  74. .. option:: --string-dump=<section[,section,...]>, -p
  75. Display the specified section(s) as a list of strings. ``section`` may be a
  76. section index or section name.
  77. .. option:: --symbols, --syms, -t
  78. Display the symbol table.
  79. .. option:: --unwind, -u
  80. Display unwind information.
  81. .. option:: --version
  82. Display the version of this program.
  83. .. option:: @<FILE>
  84. Read command-line options from response file `<FILE>`.
  85. ELF SPECIFIC OPTIONS
  86. --------------------
  87. The following options are implemented only for the ELF file format.
  88. .. option:: --arm-attributes
  89. Display the ARM attributes section. Only applicable for ARM architectures.
  90. .. option:: --demangle, -C
  91. Display demangled symbol names in the output.
  92. .. option:: --dyn-relocations
  93. Display the dynamic relocation entries.
  94. .. option:: --dyn-symbols, --dyn-syms, --dt
  95. Display the dynamic symbol table.
  96. .. option:: --dynamic-table, --dynamic, -d
  97. Display the dynamic table.
  98. .. option:: --elf-cg-profile
  99. Display the callgraph profile section.
  100. .. option:: --elf-hash-histogram, --histogram, -I
  101. Display a bucket list histogram for dynamic symbol hash tables.
  102. .. option:: --elf-linker-options
  103. Display the linker options section.
  104. .. option:: --elf-output-style=<value>
  105. Specify the style to dump ELF information in. Valid options are ``LLVM`` and
  106. ``GNU``. ``LLVM`` output (the default) is an expanded and structured format,
  107. whilst ``GNU`` output mimics the equivalent GNU :program:`readelf` output.
  108. .. option:: --elf-section-groups, --section-groups, -g
  109. Display section groups.
  110. .. option:: --gnu-hash-table
  111. Display the GNU hash table for dynamic symbols.
  112. .. option:: --hash-symbols
  113. Display the dynamic symbols derived from the hash table.
  114. .. option:: --hash-table
  115. Display the hash table for dynamic symbols.
  116. .. option:: --notes, -n
  117. Display all notes.
  118. .. option:: --program-headers, --segments, -l
  119. Display the program headers.
  120. .. option:: --raw-relr
  121. Do not decode relocations in RELR relocation sections when displaying them.
  122. .. option:: --section-mapping
  123. Display the section to segment mapping.
  124. .. option:: --version-info, -V
  125. Display version sections.
  126. MACH-O SPECIFIC OPTIONS
  127. -----------------------
  128. The following options are implemented only for the Mach-O file format.
  129. .. option:: --macho-data-in-code
  130. Display the Data in Code command.
  131. .. option:: --macho-dsymtab
  132. Display the Dsymtab command.
  133. .. option:: --macho-indirect-symbols
  134. Display indirect symbols.
  135. .. option:: --macho-linker-options
  136. Display the Mach-O-specific linker options.
  137. .. option:: --macho-segment
  138. Display the Segment command.
  139. .. option:: --macho-version-min
  140. Display the version min command.
  141. PE/COFF SPECIFIC OPTIONS
  142. ------------------------
  143. The following options are implemented only for the PE/COFF file format.
  144. .. option:: --codeview
  145. Display CodeView debug information.
  146. .. option:: --codeview-ghash
  147. Enable global hashing for CodeView type stream de-duplication.
  148. .. option:: --codeview-merged-types
  149. Display the merged CodeView type stream.
  150. .. option:: --codeview-subsection-bytes
  151. Dump raw contents of CodeView debug sections and records.
  152. .. option:: --coff-basereloc
  153. Display the .reloc section.
  154. .. option:: --coff-debug-directory
  155. Display the debug directory.
  156. .. option:: --coff-directives
  157. Display the .drectve section.
  158. .. option:: --coff-exports
  159. Display the export table.
  160. .. option:: --coff-imports
  161. Display the import table.
  162. .. option:: --coff-load-config
  163. Display the load config.
  164. .. option:: --coff-resources
  165. Display the .rsrc section.
  166. EXIT STATUS
  167. -----------
  168. :program:`llvm-readobj` returns 0 under normal operation. It returns a non-zero
  169. exit code if there were any errors.
  170. SEE ALSO
  171. --------
  172. :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readelf(1)`