1LLVM-READOBJ(1) LLVM LLVM-READOBJ(1)
2
3
4
6 llvm-readobj - LLVM Object Reader
7
9 llvm-readobj [options] [input...]
10
12 The llvm-readobj tool displays low-level format-specific information
13 about one or more object files.
14
15 If input is "-", llvm-readobj reads from standard input. Otherwise, it
16 will read from the specified filenames.
17
19 llvm-readelf is an alias for the llvm-readobj tool with a slightly dif‐
20 ferent command-line interface and output that is GNU compatible. Fol‐
21 lowing is a list of differences between llvm-readelf and llvm-readobj:
22
23 • llvm-readelf uses GNU for the --elf-output-style option by default.
24 llvm-readobj uses LLVM.
25
26 • llvm-readelf allows single-letter grouped flags (e.g. llvm-readelf
27 -SW is the same as llvm-readelf -S -W). llvm-readobj does not allow
28 grouping.
29
30 • llvm-readelf provides -s as an alias for --symbols, for GNU readelf
31 compatibility, whereas it is an alias for --section-headers in
32 llvm-readobj.
33
34 • llvm-readobj provides -t as an alias for --symbols. llvm-readelf
35 does not.
36
37 • llvm-readobj provides --sr, --sd, --st and --dt as aliases for
38 --section-relocations, --section-data, --section-symbols and
39 --dyn-symbols respectively. llvm-readelf does not provide these
40 aliases, to avoid conflicting with grouped flags.
41
43 These options are applicable to more than one file format, or are unre‐
44 lated to file formats.
45
46 --all Equivalent to specifying all the main display options relevant
47 to the file format.
48
49 --addrsig
50 Display the address-significance table.
51
52 --expand-relocs
53 When used with --relocs, display each relocation in an expanded
54 multi-line format.
55
56 --file-header, -h
57 Display file headers.
58
59 --headers, -e
60 Equivalent to setting: --file-header, --program-headers, and
61 --sections.
62
63 --help Display a summary of command line options.
64
65 --hex-dump=<section[,section,...]>, -x
66 Display the specified section(s) as hexadecimal bytes. section
67 may be a section index or section name.
68
69 --memtag
70
71 Display information about memory tagging present in the binary.
72 This includes various memtag-specific dynamic entries, decoded
73 global descriptor sections, and decoded Android-specific ELF
74 notes.
75
76 --needed-libs
77 Display the needed libraries.
78
79 --relocations, --relocs, -r
80 Display the relocation entries in the file.
81
82 --sections, --section-headers, -S
83 Display all sections.
84
85 --section-data, --sd
86 When used with --sections, display section data for each section
87 shown. This option has no effect for GNU style output.
88
89 --section-relocations, --sr
90 When used with --sections, display relocations for each section
91 shown. This option has no effect for GNU style output.
92
93 --section-symbols, --st
94 When used with --sections, display symbols for each section
95 shown. This option has no effect for GNU style output.
96
97 --sort-symbols=<sort_key[,sort_key]>
98 Specify the keys to sort symbols before displaying symtab.
99 Valid values for sort_key are name and type.
100
101 --stackmap
102 Display contents of the stackmap section.
103
104 --string-dump=<section[,section,...]>, -p
105 Display the specified section(s) as a list of strings. section
106 may be a section index or section name.
107
108 --string-table
109 Display contents of the string table.
110
111 --symbols, --syms, -s
112 Display the symbol table.
113
114 --unwind, -u
115 Display unwind information.
116
117 --version
118 Display the version of the llvm-readobj executable.
119
120 @<FILE>
121 Read command-line options from response file <FILE>.
122
124 The following options are implemented only for the ELF file format.
125
126 --arch-specific, -A
127 Display architecture-specific information, e.g. the ARM at‐
128 tributes section on ARM.
129
130 --bb-addr-map
131 Display the contents of the basic block address map section(s),
132 which contain the address of each function, along with the rela‐
133 tive offset of each basic block.
134
135 --demangle, -C
136 Display demangled symbol names in the output.
137
138 --dependent-libraries
139 Display the dependent libraries section.
140
141 --dyn-relocations
142 Display the dynamic relocation entries.
143
144 --dyn-symbols, --dyn-syms, --dt
145 Display the dynamic symbol table.
146
147 --dynamic-table, --dynamic, -d
148 Display the dynamic table.
149
150 --cg-profile
151 Display the callgraph profile section.
152
153 --histogram, -I
154 Display a bucket list histogram for dynamic symbol hash tables.
155
156 --elf-linker-options
157 Display the linker options section.
158
159 --elf-output-style=<value>
160 Format ELF information in the specified style. Valid options are
161 LLVM, GNU, and JSON. LLVM output (the default) is an expanded
162 and structured format. GNU output mimics the equivalent GNU
163 readelf output. JSON is JSON formatted output intended for ma‐
164 chine consumption.
165
166 --section-groups, -g
167 Display section groups.
168
169 --gnu-hash-table
170 Display the GNU hash table for dynamic symbols.
171
172 --hash-symbols
173 Display the expanded hash table with dynamic symbol data.
174
175 --hash-table
176 Display the hash table for dynamic symbols.
177
178 --memtag
179 Display information about memory tagging present in the binary.
180 This includes various dynamic entries, decoded global descriptor
181 sections, and decoded Android-specific ELF notes.
182
183 --notes, -n
184 Display all notes.
185
186 --pretty-print
187 When used with --elf-output-style, JSON output will be formatted
188 in a more readable format.
189
190 --program-headers, --segments, -l
191 Display the program headers.
192
193 --raw-relr
194 Do not decode relocations in RELR relocation sections when dis‐
195 playing them.
196
197 --section-mapping
198 Display the section to segment mapping.
199
200 --stack-sizes
201 Display the contents of the stack sizes section(s), i.e. pairs
202 of function names and the size of their stack frames. Currently
203 only implemented for GNU style output.
204
205 --version-info, -V
206 Display version sections.
207
209 The following options are implemented only for the Mach-O file format.
210
211 --macho-data-in-code
212 Display the Data in Code command.
213
214 --macho-dsymtab
215 Display the Dsymtab command.
216
217 --macho-indirect-symbols
218 Display indirect symbols.
219
220 --macho-linker-options
221 Display the Mach-O-specific linker options.
222
223 --macho-segment
224 Display the Segment command.
225
226 --macho-version-min
227 Display the version min command.
228
230 The following options are implemented only for the PE/COFF file format.
231
232 --codeview
233 Display CodeView debug information.
234
235 --codeview-ghash
236 Enable global hashing for CodeView type stream de-duplication.
237
238 --codeview-merged-types
239 Display the merged CodeView type stream.
240
241 --codeview-subsection-bytes
242 Dump raw contents of CodeView debug sections and records.
243
244 --coff-basereloc
245 Display the .reloc section.
246
247 --coff-debug-directory
248 Display the debug directory.
249
250 --coff-tls-directory
251 Display the TLS directory.
252
253 --coff-directives
254 Display the .drectve section.
255
256 --coff-exports
257 Display the export table.
258
259 --coff-imports
260 Display the import table.
261
262 --coff-load-config
263 Display the load config.
264
265 --coff-resources
266 Display the .rsrc section.
267
269 The following options are implemented only for the XCOFF file format.
270
271 --auxiliary-header
272 Display XCOFF Auxiliary header.
273
274 --exception-section
275 Display XCOFF exception section entries.
276
277 --loader-section-header
278 Display XCOFF loader section header.
279
280 --loader-section-symbols
281 Display symbol table of loader section.
282
283 --loader-section-relocations
284 Display relocation entries of loader section.
285
287 llvm-readobj returns 0 under normal operation. It returns a non-zero
288 exit code if there were any errors.
289
291 llvm-nm(1), llvm-objdump(1), llvm-readelf(1)
292
294 Maintained by the LLVM Team (https://llvm.org/).
295
297 2003-2023, LLVM Project
298
299
300
301
30217 2023-11-28 LLVM-READOBJ(1)