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 --needed-libs
70 Display the needed libraries.
71
72 --relocations, --relocs, -r
73 Display the relocation entries in the file.
74
75 --sections, --section-headers, -S
76 Display all sections.
77
78 --section-data, --sd
79 When used with --sections, display section data for each section
80 shown. This option has no effect for GNU style output.
81
82 --section-relocations, --sr
83 When used with --sections, display relocations for each section
84 shown. This option has no effect for GNU style output.
85
86 --section-symbols, --st
87 When used with --sections, display symbols for each section
88 shown. This option has no effect for GNU style output.
89
90 --stackmap
91 Display contents of the stackmap section.
92
93 --string-dump=<section[,section,...]>, -p
94 Display the specified section(s) as a list of strings. section
95 may be a section index or section name.
96
97 --string-table
98 Display contents of the string table.
99
100 --symbols, --syms, -s
101 Display the symbol table.
102
103 --unwind, -u
104 Display unwind information.
105
106 --version
107 Display the version of the llvm-readobj executable.
108
109 @<FILE>
110 Read command-line options from response file <FILE>.
111
113 The following options are implemented only for the ELF file format.
114
115 --arch-specific, -A
116 Display architecture-specific information, e.g. the ARM at‐
117 tributes section on ARM.
118
119 --bb-addr-map
120 Display the contents of the basic block address map section(s),
121 which contain the address of each function, along with the rela‐
122 tive offset of each basic block.
123
124 --demangle, -C
125 Display demangled symbol names in the output.
126
127 --dependent-libraries
128 Display the dependent libraries section.
129
130 --dyn-relocations
131 Display the dynamic relocation entries.
132
133 --dyn-symbols, --dyn-syms, --dt
134 Display the dynamic symbol table.
135
136 --dynamic-table, --dynamic, -d
137 Display the dynamic table.
138
139 --cg-profile
140 Display the callgraph profile section.
141
142 --histogram, -I
143 Display a bucket list histogram for dynamic symbol hash tables.
144
145 --elf-linker-options
146 Display the linker options section.
147
148 --elf-output-style=<value>
149 Format ELF information in the specified style. Valid options are
150 LLVM and GNU. LLVM output (the default) is an expanded and
151 structured format, whilst GNU output mimics the equivalent GNU
152 readelf output.
153
154 --section-groups, -g
155 Display section groups.
156
157 --gnu-hash-table
158 Display the GNU hash table for dynamic symbols.
159
160 --hash-symbols
161 Display the expanded hash table with dynamic symbol data.
162
163 --hash-table
164 Display the hash table for dynamic symbols.
165
166 --notes, -n
167 Display all notes.
168
169 --program-headers, --segments, -l
170 Display the program headers.
171
172 --raw-relr
173 Do not decode relocations in RELR relocation sections when dis‐
174 playing them.
175
176 --section-mapping
177 Display the section to segment mapping.
178
179 --stack-sizes
180 Display the contents of the stack sizes section(s), i.e. pairs
181 of function names and the size of their stack frames. Currently
182 only implemented for GNU style output.
183
184 --version-info, -V
185 Display version sections.
186
188 The following options are implemented only for the Mach-O file format.
189
190 --macho-data-in-code
191 Display the Data in Code command.
192
193 --macho-dsymtab
194 Display the Dsymtab command.
195
196 --macho-indirect-symbols
197 Display indirect symbols.
198
199 --macho-linker-options
200 Display the Mach-O-specific linker options.
201
202 --macho-segment
203 Display the Segment command.
204
205 --macho-version-min
206 Display the version min command.
207
209 The following options are implemented only for the PE/COFF file format.
210
211 --codeview
212 Display CodeView debug information.
213
214 --codeview-ghash
215 Enable global hashing for CodeView type stream de-duplication.
216
217 --codeview-merged-types
218 Display the merged CodeView type stream.
219
220 --codeview-subsection-bytes
221 Dump raw contents of CodeView debug sections and records.
222
223 --coff-basereloc
224 Display the .reloc section.
225
226 --coff-debug-directory
227 Display the debug directory.
228
229 --coff-tls-directory
230 Display the TLS directory.
231
232 --coff-directives
233 Display the .drectve section.
234
235 --coff-exports
236 Display the export table.
237
238 --coff-imports
239 Display the import table.
240
241 --coff-load-config
242 Display the load config.
243
244 --coff-resources
245 Display the .rsrc section.
246
248 llvm-readobj returns 0 under normal operation. It returns a non-zero
249 exit code if there were any errors.
250
252 llvm-nm(1), llvm-objdump(1), llvm-readelf(1)
253
255 Maintained by the LLVM Team (https://llvm.org/).
256
258 2003-2023, LLVM Project
259
260
261
262
26313 2023-07-20 LLVM-READOBJ(1)