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 "``-``" or omitted, :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.
61 Use colors in the output for warnings and errors.
63 .. option:: --expand-relocs
65 When used with :option:`--relocations`, display each relocation in an expanded
68 .. option:: --file-headers, -h
72 .. option:: --headers, -e
74 Equivalent to setting: :option:`--file-headers`, :option:`--program-headers`,
75 and :option:`--sections`.
79 Display a summary of command line options.
81 .. option:: --help-list
83 Display an uncategorized summary of command line options.
85 .. option:: --hex-dump=<section[,section,...]>, -x
87 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
88 section index or section name.
90 .. option:: --needed-libs
92 Display the needed libraries.
94 .. option:: --relocations, --relocs, -r
96 Display the relocation entries in the file.
98 .. option:: --sections, --section-headers, -s, -S
100 Display all sections.
102 .. option:: --section-data, --sd
104 When used with :option:`--sections`, display section data for each section
105 shown. This option has no effect for GNU style output.
107 .. option:: --section-relocations, --sr
109 When used with :option:`--sections`, display relocations for each section
110 shown. This option has no effect for GNU style output.
112 .. option:: --section-symbols, --st
114 When used with :option:`--sections`, display symbols for each section shown.
115 This option has no effect for GNU style output.
117 .. option:: --stackmap
119 Display contents of the stackmap section.
121 .. option:: --string-dump=<section[,section,...]>, -p
123 Display the specified section(s) as a list of strings. ``section`` may be a
124 section index or section name.
126 .. option:: --symbols, --syms, -t
128 Display the symbol table.
130 .. option:: --unwind, -u
132 Display unwind information.
134 .. option:: --version
136 Display the version of the :program:`llvm-readobj` executable.
140 Read command-line options from response file `<FILE>`.
145 The following options are implemented only for the ELF file format.
147 .. option:: --arch-specific, -A
149 Display architecture-specific information, e.g. the ARM attributes section on ARM.
151 .. option:: --demangle, -C
153 Display demangled symbol names in the output.
155 .. option:: --dependent-libraries
157 Display the dependent libraries section.
159 .. option:: --dyn-relocations
161 Display the dynamic relocation entries.
163 .. option:: --dyn-symbols, --dyn-syms, --dt
165 Display the dynamic symbol table.
167 .. option:: --dynamic-table, --dynamic, -d
169 Display the dynamic table.
171 .. option:: --elf-cg-profile
173 Display the callgraph profile section.
175 .. option:: --elf-hash-histogram, --histogram, -I
177 Display a bucket list histogram for dynamic symbol hash tables.
179 .. option:: --elf-linker-options
181 Display the linker options section.
183 .. option:: --elf-output-style=<value>
185 Format ELF information in the specified style. Valid options are ``LLVM`` and
186 ``GNU``. ``LLVM`` output (the default) is an expanded and structured format,
187 whilst ``GNU`` output mimics the equivalent GNU :program:`readelf` output.
189 .. option:: --elf-section-groups, --section-groups, -g
191 Display section groups.
193 .. option:: --gnu-hash-table
195 Display the GNU hash table for dynamic symbols.
197 .. option:: --hash-symbols
199 Display the expanded hash table with dynamic symbol data.
201 .. option:: --hash-table
203 Display the hash table for dynamic symbols.
205 .. option:: --notes, -n
209 .. option:: --program-headers, --segments, -l
211 Display the program headers.
213 .. option:: --raw-relr
215 Do not decode relocations in RELR relocation sections when displaying them.
217 .. option:: --section-mapping
219 Display the section to segment mapping.
221 .. option:: --stack-sizes
223 Display the contents of the stack sizes section(s), i.e. pairs of function
224 names and the size of their stack frames. Currently only implemented for GNU
227 .. option:: --version-info, -V
229 Display version sections.
231 MACH-O SPECIFIC OPTIONS
232 -----------------------
234 The following options are implemented only for the Mach-O file format.
236 .. option:: --macho-data-in-code
238 Display the Data in Code command.
240 .. option:: --macho-dsymtab
242 Display the Dsymtab command.
244 .. option:: --macho-indirect-symbols
246 Display indirect symbols.
248 .. option:: --macho-linker-options
250 Display the Mach-O-specific linker options.
252 .. option:: --macho-segment
254 Display the Segment command.
256 .. option:: --macho-version-min
258 Display the version min command.
260 PE/COFF SPECIFIC OPTIONS
261 ------------------------
263 The following options are implemented only for the PE/COFF file format.
265 .. option:: --codeview
267 Display CodeView debug information.
269 .. option:: --codeview-ghash
271 Enable global hashing for CodeView type stream de-duplication.
273 .. option:: --codeview-merged-types
275 Display the merged CodeView type stream.
277 .. option:: --codeview-subsection-bytes
279 Dump raw contents of CodeView debug sections and records.
281 .. option:: --coff-basereloc
283 Display the .reloc section.
285 .. option:: --coff-debug-directory
287 Display the debug directory.
289 .. option:: --coff-directives
291 Display the .drectve section.
293 .. option:: --coff-exports
295 Display the export table.
297 .. option:: --coff-imports
299 Display the import table.
301 .. option:: --coff-load-config
303 Display the load config.
305 .. option:: --coff-resources
307 Display the .rsrc section.
312 :program:`llvm-readobj` returns 0 under normal operation. It returns a non-zero
313 exit code if there were any errors.
318 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readelf(1)`