1 llvm-readobj - LLVM Object Reader
2 =================================
4 .. program:: llvm-readobj
9 :program:`llvm-readobj` [*options*] [*input...*]
14 The :program:`llvm-readobj` tool displays low-level format-specific information
15 about one or more object files.
17 If ``input`` is "``-``", :program:`llvm-readobj` reads from standard
18 input. Otherwise, it will read from the specified ``filenames``.
20 DIFFERENCES TO LLVM-READELF
21 ---------------------------
23 :program:`llvm-readelf` is an alias for the :manpage:`llvm-readobj` tool with a
24 slightly different command-line interface and output that is GNU compatible.
25 Following is a list of differences between :program:`llvm-readelf` and
26 :program:`llvm-readobj`:
28 - :program:`llvm-readelf` uses `GNU` for the :option:`--elf-output-style` option
29 by default. :program:`llvm-readobj` uses `LLVM`.
30 - :program:`llvm-readelf` allows single-letter grouped flags (e.g.
31 ``llvm-readelf -SW`` is the same as ``llvm-readelf -S -W``).
32 :program:`llvm-readobj` does not allow grouping.
33 - :program:`llvm-readelf` provides :option:`-s` as an alias for
34 :option:`--symbols`, for GNU :program:`readelf` compatibility, whereas it is
35 an alias for :option:`--section-headers` in :program:`llvm-readobj`.
36 - :program:`llvm-readobj` provides ``-t`` as an alias for :option:`--symbols`.
37 :program:`llvm-readelf` does not.
38 - :program:`llvm-readobj` provides ``--sr``, ``--sd``, ``--st`` and ``--dt`` as
39 aliases for :option:`--section-relocations`, :option:`--section-data`,
40 :option:`--section-symbols` and :option:`--dyn-symbols` respectively.
41 :program:`llvm-readelf` does not provide these aliases, to avoid conflicting
44 GENERAL AND MULTI-FORMAT OPTIONS
45 --------------------------------
47 These options are applicable to more than one file format, or are unrelated to
52 Equivalent to specifying all the main display options relevant to the file
57 Display the address-significance table.
59 .. option:: --expand-relocs
61 When used with :option:`--relocs`, display each relocation in an expanded
64 .. option:: --file-header, -h
68 .. option:: --headers, -e
70 Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
71 and :option:`--sections`.
75 Display a summary of command line options.
77 .. option:: --hex-dump=<section[,section,...]>, -x
79 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
80 section index or section name.
82 .. option:: --needed-libs
84 Display the needed libraries.
86 .. option:: --relocations, --relocs, -r
88 Display the relocation entries in the file.
90 .. option:: --sections, --section-headers, -S
94 .. option:: --section-data, --sd
96 When used with :option:`--sections`, display section data for each section
97 shown. This option has no effect for GNU style output.
99 .. option:: --section-relocations, --sr
101 When used with :option:`--sections`, display relocations for each section
102 shown. This option has no effect for GNU style output.
104 .. option:: --section-symbols, --st
106 When used with :option:`--sections`, display symbols for each section shown.
107 This option has no effect for GNU style output.
109 .. option:: --stackmap
111 Display contents of the stackmap section.
113 .. option:: --string-dump=<section[,section,...]>, -p
115 Display the specified section(s) as a list of strings. ``section`` may be a
116 section index or section name.
118 .. option:: --string-table
120 Display contents of the string table.
122 .. option:: --symbols, --syms, -s
124 Display the symbol table.
126 .. option:: --unwind, -u
128 Display unwind information.
130 .. option:: --version
132 Display the version of the :program:`llvm-readobj` executable.
136 Read command-line options from response file `<FILE>`.
141 The following options are implemented only for the ELF file format.
143 .. option:: --arch-specific, -A
145 Display architecture-specific information, e.g. the ARM attributes section on ARM.
147 .. option:: --bb-addr-map
149 Display the contents of the basic block address map section(s), which contain the
150 address of each function, along with the relative offset of each basic block.
152 .. option:: --demangle, -C
154 Display demangled symbol names in the output.
156 .. option:: --dependent-libraries
158 Display the dependent libraries section.
160 .. option:: --dyn-relocations
162 Display the dynamic relocation entries.
164 .. option:: --dyn-symbols, --dyn-syms, --dt
166 Display the dynamic symbol table.
168 .. option:: --dynamic-table, --dynamic, -d
170 Display the dynamic table.
172 .. option:: --cg-profile
174 Display the callgraph profile section.
176 .. option:: --histogram, -I
178 Display a bucket list histogram for dynamic symbol hash tables.
180 .. option:: --elf-linker-options
182 Display the linker options section.
184 .. option:: --elf-output-style=<value>
186 Format ELF information in the specified style. Valid options are ``LLVM`` and
187 ``GNU``. ``LLVM`` output (the default) is an expanded and structured format,
188 whilst ``GNU`` output mimics the equivalent GNU :program:`readelf` output.
190 .. option:: --section-groups, -g
192 Display section groups.
194 .. option:: --gnu-hash-table
196 Display the GNU hash table for dynamic symbols.
198 .. option:: --hash-symbols
200 Display the expanded hash table with dynamic symbol data.
202 .. option:: --hash-table
204 Display the hash table for dynamic symbols.
206 .. option:: --notes, -n
210 .. option:: --program-headers, --segments, -l
212 Display the program headers.
214 .. option:: --raw-relr
216 Do not decode relocations in RELR relocation sections when displaying them.
218 .. option:: --section-mapping
220 Display the section to segment mapping.
222 .. option:: --stack-sizes
224 Display the contents of the stack sizes section(s), i.e. pairs of function
225 names and the size of their stack frames. Currently only implemented for GNU
228 .. option:: --version-info, -V
230 Display version sections.
232 MACH-O SPECIFIC OPTIONS
233 -----------------------
235 The following options are implemented only for the Mach-O file format.
237 .. option:: --macho-data-in-code
239 Display the Data in Code command.
241 .. option:: --macho-dsymtab
243 Display the Dsymtab command.
245 .. option:: --macho-indirect-symbols
247 Display indirect symbols.
249 .. option:: --macho-linker-options
251 Display the Mach-O-specific linker options.
253 .. option:: --macho-segment
255 Display the Segment command.
257 .. option:: --macho-version-min
259 Display the version min command.
261 PE/COFF SPECIFIC OPTIONS
262 ------------------------
264 The following options are implemented only for the PE/COFF file format.
266 .. option:: --codeview
268 Display CodeView debug information.
270 .. option:: --codeview-ghash
272 Enable global hashing for CodeView type stream de-duplication.
274 .. option:: --codeview-merged-types
276 Display the merged CodeView type stream.
278 .. option:: --codeview-subsection-bytes
280 Dump raw contents of CodeView debug sections and records.
282 .. option:: --coff-basereloc
284 Display the .reloc section.
286 .. option:: --coff-debug-directory
288 Display the debug directory.
290 .. option:: --coff-tls-directory
292 Display the TLS directory.
294 .. option:: --coff-directives
296 Display the .drectve section.
298 .. option:: --coff-exports
300 Display the export table.
302 .. option:: --coff-imports
304 Display the import table.
306 .. option:: --coff-load-config
308 Display the load config.
310 .. option:: --coff-resources
312 Display the .rsrc section.
317 :program:`llvm-readobj` returns 0 under normal operation. It returns a non-zero
318 exit code if there were any errors.
323 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readelf(1)`