Debian Codegraph @

upstream/fedora-rawhide/man1/readelf.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "READELF 1"
61 .TH READELF 1 2026-05-14 binutils-2.46.50 "GNU Development Tools"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 readelf \- display information about ELF files
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 readelf [\fB\-a\fR|\fB\-\-all\fR]
71 [\fB\-h\fR|\fB\-\-file\-header\fR]
72 [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
73 [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
74 [\fB\-g\fR|\fB\-\-section\-groups\fR]
75 [\fB\-t\fR|\fB\-\-section\-details\fR]
76 [\fB\-e\fR|\fB\-\-headers\fR]
77 [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
78 [\fB\-\-dyn\-syms\fR|\fB\-\-lto\-syms\fR]
79 [\fB\-\-sym\-base=[0|8|10|16]\fR]
80 [\fB\-\-demangle\fR\fI=style\fR|\fB\-\-no\-demangle\fR]
81 [\fB\-\-quiet\fR]
82 [\fB\-\-recurse\-limit\fR|\fB\-\-no\-recurse\-limit\fR]
83 [\fB\-U\fR \fImethod\fR|\fB\-\-unicode=\fR\fImethod\fR]
84 [\fB\-X\fR|\fB\-\-extra\-sym\-info\fR|\fB\-\-no\-extra\-sym\-info\fR]
85 [\fB\-n\fR|\fB\-\-notes\fR]
86 [\fB\-r\fR|\fB\-\-relocs\fR]
87 [\fB\-u\fR|\fB\-\-unwind\fR]
88 [\fB\-d\fR|\fB\-\-dynamic\fR]
89 [\fB\-V\fR|\fB\-\-version\-info\fR]
90 [\fB\-A\fR|\fB\-\-arch\-specific\fR]
91 [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
92 [\fB\-L\fR|\fB\-\-lint\fR|\fB\-\-enable\-checks\fR]
93 [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
94 [\fB\-p\fR <number or name>|\fB\-\-string\-dump=\fR<number or name>]
95 [\fB\-R\fR <number or name>|\fB\-\-relocated\-dump=\fR<number or name>]
96 [\fB\-j\fR <number or name>|\fB\-\-display\-section=\fR<number or name>]
97 [\fB\-z\fR|\fB\-\-decompress\fR]
98 [\fB\-c\fR|\fB\-\-archive\-index\fR]
99 [\fB\-w\fR|\fB\-\-debug\-dump\fR]
100 [\fB\-wa\fR|\fB\-\-debug\-dump=abbrev\fR]
101 [\fB\-wA\fR|\fB\-\-debug\-dump=addr\fR]
102 [\fB\-wr\fR|\fB\-\-debug\-dump=aranges\fR]
103 [\fB\-wc\fR|\fB\-\-debug\-dump=cu_index\fR]
104 [\fB\-wL\fR|\fB\-\-debug\-dump=decodedline\fR]
105 [\fB\-wf\fR|\fB\-\-debug\-dump=frames\fR]
106 [\fB\-wF\fR|\fB\-\-debug\-dump=frames\-interp\fR]
107 [\fB\-wg\fR|\fB\-\-debug\-dump=gdb_index\fR]
108 [\fB\-wi\fR|\fB\-\-debug\-dump=info\fR]
109 [\fB\-wk\fR|\fB\-\-debug\-dump=links\fR]
110 [\fB\-wo\fR|\fB\-\-debug\-dump=loc\fR]
111 [\fB\-wm\fR|\fB\-\-debug\-dump=macro\fR]
112 [\fB\-wp\fR|\fB\-\-debug\-dump=pubnames\fR]
113 [\fB\-wt\fR|\fB\-\-debug\-dump=pubtypes\fR]
114 [\fB\-wR\fR|\fB\-\-debug\-dump=Ranges\fR]
115 [\fB\-wl\fR|\fB\-\-debug\-dump=rawline\fR]
116 [\fB\-ws\fR|\fB\-\-debug\-dump=str\fR]
117 [\fB\-wO\fR|\fB\-\-debug\-dump=str\-offsets\fR]
118 [\fB\-wu\fR|\fB\-\-debug\-dump=trace_abbrev\fR]
119 [\fB\-wT\fR|\fB\-\-debug\-dump=trace_aranges\fR]
120 [\fB\-wU\fR|\fB\-\-debug\-dump=trace_info\fR]
121 [\fB\-wK\fR|\fB\-\-debug\-dump=follow\-links\fR]
122 [\fB\-wN\fR|\fB\-\-debug\-dump=no\-follow\-links\fR]
123 [\fB\-wD\fR|\fB\-\-debug\-dump=use\-debuginfod\fR]
124 [\fB\-wE\fR|\fB\-\-debug\-dump=do\-not\-use\-debuginfod\fR]
125 [\fB\-\-debug\-dir=\fR\f(BIdir\fR]
126 [\fB\-P\fR|\fB\-\-process\-links\fR]
127 [\fB\-\-dwarf\-depth=\fR\fIn\fR]
128 [\fB\-\-dwarf\-start=\fR\fIn\fR]
129 [\fB\-\-ctf=\fR\fIsection\fR]
130 [\fB\-\-ctf\-parent=\fR\fIsection\fR]
131 [\fB\-\-ctf\-symbols=\fR\fIsection\fR]
132 [\fB\-\-ctf\-strings=\fR\fIsection\fR]
133 [\fB\-\-sframe=\fR\fIsection\fR]
134 [\fB\-I\fR|\fB\-\-histogram\fR]
135 [\fB\-\-got\-contents\fR]
136 [\fB\-v\fR|\fB\-\-version\fR]
137 [\fB\-W\fR|\fB\-\-wide\fR]
138 [\fB\-T\fR|\fB\-\-silent\-truncation\fR]
139 [\fB\-H\fR|\fB\-\-help\fR]
140 \fIelffile\fR...
141 .SH DESCRIPTION
142 .IX Header "DESCRIPTION"
143 \&\fBreadelf\fR displays information about one or more ELF format object
144 files. The options control what particular information to display.
145 .PP
146 \&\fIelffile\fR... are the object files to be examined. 32\-bit and
147 64\-bit ELF files are supported, as are archives containing ELF files.
148 .PP
149 This program performs a similar function to \fBobjdump\fR but it
150 goes into more detail and it exists independently of the BFD
151 library, so if there is a bug in BFD then readelf will not be
152 affected.
153 .SH OPTIONS
154 .IX Header "OPTIONS"
155 The long and short forms of options, shown here as alternatives, are
156 equivalent. At least one option besides \fB\-v\fR or \fB\-H\fR must be
157 given.
158 .IP \fB\-a\fR 4
159 .IX Item "-a"
160 .PD 0
161 .IP \fB\-\-all\fR 4
162 .IX Item "--all"
163 .PD
164 Equivalent to specifying \fB\-\-file\-header\fR,
165 \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
166 \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR,
167 \&\fB\-\-got\-contents\fR, \fB\-\-version\-info\fR,
168 \&\fB\-\-arch\-specific\fR, \fB\-\-unwind\fR,
169 \&\fB\-\-section\-groups\fR and \fB\-\-histogram\fR.
170 .Sp
171 Note \- this option does not enable \fB\-\-use\-dynamic\fR itself, so
172 if that option is not present on the command line then dynamic symbols
173 and dynamic relocs will not be displayed.
174 .IP \fB\-h\fR 4
175 .IX Item "-h"
176 .PD 0
177 .IP \fB\-\-file\-header\fR 4
178 .IX Item "--file-header"
179 .PD
180 Displays the information contained in the ELF header at the start of the
181 file.
182 .IP \fB\-l\fR 4
183 .IX Item "-l"
184 .PD 0
185 .IP \fB\-\-program\-headers\fR 4
186 .IX Item "--program-headers"
187 .IP \fB\-\-segments\fR 4
188 .IX Item "--segments"
189 .PD
190 Displays the information contained in the file\*(Aqs segment headers, if it
191 has any.
192 .IP \fB\-\-quiet\fR 4
193 .IX Item "--quiet"
194 Suppress "no symbols" diagnostic.
195 .IP \fB\-S\fR 4
196 .IX Item "-S"
197 .PD 0
198 .IP \fB\-\-sections\fR 4
199 .IX Item "--sections"
200 .IP \fB\-\-section\-headers\fR 4
201 .IX Item "--section-headers"
202 .PD
203 Displays the information contained in the file\*(Aqs section headers, if it
204 has any.
205 .IP \fB\-g\fR 4
206 .IX Item "-g"
207 .PD 0
208 .IP \fB\-\-section\-groups\fR 4
209 .IX Item "--section-groups"
210 .PD
211 Displays the information contained in the file\*(Aqs section groups, if it
212 has any.
213 .IP \fB\-t\fR 4
214 .IX Item "-t"
215 .PD 0
216 .IP \fB\-\-section\-details\fR 4
217 .IX Item "--section-details"
218 .PD
219 Displays the detailed section information. Implies \fB\-S\fR.
220 .IP \fB\-s\fR 4
221 .IX Item "-s"
222 .PD 0
223 .IP \fB\-\-symbols\fR 4
224 .IX Item "--symbols"
225 .IP \fB\-\-syms\fR 4
226 .IX Item "--syms"
227 .PD
228 Displays the entries in symbol table section of the file, if it has one.
229 If a symbol has version information associated with it then this is
230 displayed as well. The version string is displayed as a suffix to the
231 symbol name, preceded by an @ character. For example
232 \&\fBfoo@VER_1\fR. If the version is the default version to be used
233 when resolving unversioned references to the symbol then it is
234 displayed as a suffix preceded by two @ characters. For example
235 \&\fBfoo@@VER_2\fR.
236 .IP \fB\-\-dyn\-syms\fR 4
237 .IX Item "--dyn-syms"
238 Displays the entries in dynamic symbol table section of the file, if it
239 has one. The output format is the same as the format used by the
240 \&\fB\-\-syms\fR option.
241 .IP \fB\-\-lto\-syms\fR 4
242 .IX Item "--lto-syms"
243 Displays the contents of any LTO symbol tables in the file.
244 .IP \fB\-\-sym\-base=[0|8|10|16]\fR 4
245 .IX Item "--sym-base=[0|8|10|16]"
246 Forces the size field of the symbol table to use the given base. Any
247 unrecognized options will be treated as \fB0\fR. \fB\-\-sym\-base=0\fR
248 represents the default and legacy behaviour. This will output sizes as decimal
249 for numbers less than 100000. For sizes 100000 and greater hexadecimal notation
250 will be used with a 0x prefix.
251 \&\fB\-\-sym\-base=8\fR will give the symbol sizes in octal.
252 \&\fB\-\-sym\-base=10\fR will always give the symbol sizes in decimal.
253 \&\fB\-\-sym\-base=16\fR will always give the symbol sizes in hexadecimal with a
254 0x prefix.
255 .IP \fB\-C\fR 4
256 .IX Item "-C"
257 .PD 0
258 .IP \fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR 4
259 .IX Item "--demangle[=style]"
260 .PD
261 Decode (\fIdemangle\fR) low\-level symbol names into user\-level names.
262 This makes C++ function names readable. Different compilers have
263 different mangling styles. The optional demangling style argument can
264 be used to choose an appropriate demangling style for your
265 compiler.
266 .IP \fB\-\-no\-demangle\fR 4
267 .IX Item "--no-demangle"
268 Do not demangle low\-level symbol names. This is the default.
269 .IP \fB\-\-recurse\-limit\fR 4
270 .IX Item "--recurse-limit"
271 .PD 0
272 .IP \fB\-\-no\-recurse\-limit\fR 4
273 .IX Item "--no-recurse-limit"
274 .IP \fB\-\-recursion\-limit\fR 4
275 .IX Item "--recursion-limit"
276 .IP \fB\-\-no\-recursion\-limit\fR 4
277 .IX Item "--no-recursion-limit"
278 .PD
279 Enables or disables a limit on the amount of recursion performed
280 whilst demangling strings. Since the name mangling formats allow for
281 an infinite level of recursion it is possible to create strings whose
282 decoding will exhaust the amount of stack space available on the host
283 machine, triggering a memory fault. The limit tries to prevent this
284 from happening by restricting recursion to 2048 levels of nesting.
285 .Sp
286 The default is for this limit to be enabled, but disabling it may be
287 necessary in order to demangle truly complicated names. Note however
288 that if the recursion limit is disabled then stack exhaustion is
289 possible and any bug reports about such an event will be rejected.
290 .IP "\fB\-U\fR \fI[d|i|l|e|x|h]\fR" 4
291 .IX Item "-U [d|i|l|e|x|h]"
292 .PD 0
293 .IP \fB\-\-unicode=[default|invalid|locale|escape|hex|highlight]\fR 4
294 .IX Item "--unicode=[default|invalid|locale|escape|hex|highlight]"
295 .PD
296 Controls the display of non\-ASCII characters in identifier names.
297 The default (\fB\-\-unicode=locale\fR or \fB\-\-unicode=default\fR) is
298 to treat them as multibyte characters and display them in the current
299 locale. All other versions of this option treat the bytes as UTF\-8
300 encoded values and attempt to interpret them. If they cannot be
301 interpreted or if the \fB\-\-unicode=invalid\fR option is used then
302 they are displayed as a sequence of hex bytes, encloses in curly
303 parethesis characters.
304 .Sp
305 Using the \fB\-\-unicode=escape\fR option will display the characters
306 as as unicode escape sequences (\fI\euxxxx\fR). Using the
307 \&\fB\-\-unicode=hex\fR will display the characters as hex byte
308 sequences enclosed between angle brackets.
309 .Sp
310 Using the \fB\-\-unicode=highlight\fR will display the characters as
311 unicode escape sequences but it will also highlighted them in red,
312 assuming that colouring is supported by the output device. The
313 colouring is intended to draw attention to the presence of unicode
314 sequences when they might not be expected.
315 .IP \fB\-X\fR 4
316 .IX Item "-X"
317 .PD 0
318 .IP \fB\-\-extra\-sym\-info\fR 4
319 .IX Item "--extra-sym-info"
320 .PD
321 When displaying details of symbols, include extra information not
322 normally presented. Currently this just adds the name of the section
323 referenced by the symbol\*(Aqs index field, if there is one. In the
324 future more information may be displayed when this option is enabled.
325 .Sp
326 Enabling this option effectively enables the \fB\-\-wide\fR option as
327 well, at least when displaying symbol information.
328 .IP \fB\-\-no\-extra\-sym\-info\fR 4
329 .IX Item "--no-extra-sym-info"
330 Disables the effect of the \fB\-\-extra\-sym\-info\fR option. This
331 is the default.
332 .IP \fB\-e\fR 4
333 .IX Item "-e"
334 .PD 0
335 .IP \fB\-\-headers\fR 4
336 .IX Item "--headers"
337 .PD
338 Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
339 .IP \fB\-n\fR 4
340 .IX Item "-n"
341 .PD 0
342 .IP \fB\-\-notes\fR 4
343 .IX Item "--notes"
344 .PD
345 Displays the contents of the NOTE segments and/or sections, if any.
346 .IP \fB\-r\fR 4
347 .IX Item "-r"
348 .PD 0
349 .IP \fB\-\-relocs\fR 4
350 .IX Item "--relocs"
351 .PD
352 Displays the contents of the file\*(Aqs relocation section, if it has one.
353 .IP \fB\-u\fR 4
354 .IX Item "-u"
355 .PD 0
356 .IP \fB\-\-unwind\fR 4
357 .IX Item "--unwind"
358 .PD
359 Displays the contents of the file\*(Aqs unwind section, if it has one. Only
360 the unwind sections for IA64 ELF files, as well as ARM unwind tables
361 (\f(CW\*(C`.ARM.exidx\*(C'\fR / \f(CW\*(C`.ARM.extab\*(C'\fR) are currently supported. If
362 support is not yet implemented for your architecture you could try
363 dumping the contents of the \fI.eh_frames\fR section using the
364 \&\fB\-\-debug\-dump=frames\fR or \fB\-\-debug\-dump=frames\-interp\fR
365 options.
366 .IP \fB\-d\fR 4
367 .IX Item "-d"
368 .PD 0
369 .IP \fB\-\-dynamic\fR 4
370 .IX Item "--dynamic"
371 .PD
372 Displays the contents of the file\*(Aqs dynamic section, if it has one.
373 .IP \fB\-V\fR 4
374 .IX Item "-V"
375 .PD 0
376 .IP \fB\-\-version\-info\fR 4
377 .IX Item "--version-info"
378 .PD
379 Displays the contents of the version sections in the file, if they
380 exist.
381 .IP \fB\-A\fR 4
382 .IX Item "-A"
383 .PD 0
384 .IP \fB\-\-arch\-specific\fR 4
385 .IX Item "--arch-specific"
386 .PD
387 Displays architecture\-specific information in the file, if there
388 is any.
389 .IP \fB\-D\fR 4
390 .IX Item "-D"
391 .PD 0
392 .IP \fB\-\-use\-dynamic\fR 4
393 .IX Item "--use-dynamic"
394 .PD
395 When displaying symbols, this option makes \fBreadelf\fR use the
396 symbol hash tables in the file\*(Aqs dynamic section, rather than the
397 symbol table sections.
398 .Sp
399 When displaying relocations, this option makes \fBreadelf\fR
400 display the dynamic relocations rather than the static relocations.
401 .IP \fB\-L\fR 4
402 .IX Item "-L"
403 .PD 0
404 .IP \fB\-\-lint\fR 4
405 .IX Item "--lint"
406 .IP \fB\-\-enable\-checks\fR 4
407 .IX Item "--enable-checks"
408 .PD
409 Displays warning messages about possible problems with the file(s)
410 being examined. If used on its own then all of the contents of the
411 file(s) will be examined. If used with one of the dumping options
412 then the warning messages will only be produced for the things being
413 displayed.
414 .IP "\fB\-x <number or name>\fR" 4
415 .IX Item "-x <number or name>"
416 .PD 0
417 .IP "\fB\-\-hex\-dump=<number or name>\fR" 4
418 .IX Item "--hex-dump=<number or name>"
419 .PD
420 Displays the contents of the indicated section as a hexadecimal bytes.
421 A number identifies a particular section by index in the section table;
422 any other string identifies all sections with that name in the object file.
423 This option can be repeated multiple times on the command line in
424 order to request multiple hex dumps.
425 .IP "\fB\-R <number or name>\fR" 4
426 .IX Item "-R <number or name>"
427 .PD 0
428 .IP "\fB\-\-relocated\-dump=<number or name>\fR" 4
429 .IX Item "--relocated-dump=<number or name>"
430 .PD
431 Displays the contents of the indicated section as a hexadecimal
432 bytes. A number identifies a particular section by index in the
433 section table; any other string identifies all sections with that name
434 in the object file. The contents of the section will be relocated
435 before they are displayed.
436 This option can be repeated multiple times on the command line in
437 order to request multiple relocated dumps.
438 .IP "\fB\-p <number or name>\fR" 4
439 .IX Item "-p <number or name>"
440 .PD 0
441 .IP "\fB\-\-string\-dump=<number or name>\fR" 4
442 .IX Item "--string-dump=<number or name>"
443 .PD
444 Displays the contents of the indicated section as printable strings.
445 A number identifies a particular section by index in the section table;
446 any other string identifies all sections with that name in the object file.
447 This option can be repeated multiple times on the command line in
448 order to request multiple string dumps.
449 .IP "\fB\-j <number or name>\fR" 4
450 .IX Item "-j <number or name>"
451 .PD 0
452 .IP \fB\-\-display\-section\fR 4
453 .IX Item "--display-section"
454 .PD
455 Displays the contents of the indicated section according to its
456 section header type. Sections containing relocations will be
457 displayed as if the \fB\-\-relocations\fR option had been used,
458 sections contains symbols will be displayed as if the \fB\-\-syms\fR
459 option had been used and so on.
460 .Sp
461 A number identifies a particular section by index in the section
462 table; any other string identifies all sections with that name in the
463 input file(s).
464 .Sp
465 This option can be repeated multiple times on the command line in
466 order to request multiple section dumps.
467 .IP \fB\-z\fR 4
468 .IX Item "-z"
469 .PD 0
470 .IP \fB\-\-decompress\fR 4
471 .IX Item "--decompress"
472 .PD
473 Requests that the section(s) being dumped by \fBx\fR, \fBR\fR or
474 \&\fBp\fR options are decompressed before being displayed. If the
475 section(s) are not compressed then they are displayed as is.
476 .IP \fB\-c\fR 4
477 .IX Item "-c"
478 .PD 0
479 .IP \fB\-\-archive\-index\fR 4
480 .IX Item "--archive-index"
481 .PD
482 Displays the file symbol index information contained in the header part
483 of binary archives. Performs the same function as the \fBt\fR
484 command to \fBar\fR, but without using the BFD library.
485 .IP \fB\-w[lLiaprmfFsOoRtUuTgAckK]\fR 4
486 .IX Item "-w[lLiaprmfFsOoRtUuTgAckK]"
487 .PD 0
488 .IP \fB\-\-debug\-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=str\-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow\-links]\fR 4
489 .IX Item "--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]"
490 .PD
491 Displays the contents of the DWARF debug sections in the file, if any
492 are present. Compressed debug sections are automatically decompressed
493 (temporarily) before they are displayed. If one or more of the
494 optional letters or words follows the switch then only those type(s)
495 of data will be dumped. The letters and words refer to the following
496 information:
497 .RS 4
498 .ie n .IP """a""" 4
499 .el .IP \f(CWa\fR 4
500 .IX Item "a"
501 .PD 0
502 .ie n .IP """=abbrev""" 4
503 .el .IP \f(CW=abbrev\fR 4
504 .IX Item "=abbrev"
505 .PD
506 Displays the contents of the \fB.debug_abbrev\fR section.
507 .ie n .IP """A""" 4
508 .el .IP \f(CWA\fR 4
509 .IX Item "A"
510 .PD 0
511 .ie n .IP """=addr""" 4
512 .el .IP \f(CW=addr\fR 4
513 .IX Item "=addr"
514 .PD
515 Displays the contents of the \fB.debug_addr\fR section.
516 .ie n .IP """c""" 4
517 .el .IP \f(CWc\fR 4
518 .IX Item "c"
519 .PD 0
520 .ie n .IP """=cu_index""" 4
521 .el .IP \f(CW=cu_index\fR 4
522 .IX Item "=cu_index"
523 .PD
524 Displays the contents of the \fB.debug_cu_index\fR and/or
525 \&\fB.debug_tu_index\fR sections.
526 .ie n .IP """f""" 4
527 .el .IP \f(CWf\fR 4
528 .IX Item "f"
529 .PD 0
530 .ie n .IP """=frames""" 4
531 .el .IP \f(CW=frames\fR 4
532 .IX Item "=frames"
533 .PD
534 Display the raw contents of a \fB.debug_frame\fR section.
535 .ie n .IP """F""" 4
536 .el .IP \f(CWF\fR 4
537 .IX Item "F"
538 .PD 0
539 .ie n .IP """=frames\-interp""" 4
540 .el .IP \f(CW=frames\-interp\fR 4
541 .IX Item "=frames-interp"
542 .PD
543 Display the interpreted contents of a \fB.debug_frame\fR section.
544 .ie n .IP """g""" 4
545 .el .IP \f(CWg\fR 4
546 .IX Item "g"
547 .PD 0
548 .ie n .IP """=gdb_index""" 4
549 .el .IP \f(CW=gdb_index\fR 4
550 .IX Item "=gdb_index"
551 .PD
552 Displays the contents of the \fB.gdb_index\fR and/or
553 \&\fB.debug_names\fR sections.
554 .ie n .IP """i""" 4
555 .el .IP \f(CWi\fR 4
556 .IX Item "i"
557 .PD 0
558 .ie n .IP """=info""" 4
559 .el .IP \f(CW=info\fR 4
560 .IX Item "=info"
561 .PD
562 Displays the contents of the \fB.debug_info\fR section. Note: the
563 output from this option can also be restricted by the use of the
564 \&\fB\-\-dwarf\-depth\fR and \fB\-\-dwarf\-start\fR options.
565 .ie n .IP """k""" 4
566 .el .IP \f(CWk\fR 4
567 .IX Item "k"
568 .PD 0
569 .ie n .IP """=links""" 4
570 .el .IP \f(CW=links\fR 4
571 .IX Item "=links"
572 .PD
573 Displays the contents of the \fB.gnu_debuglink\fR,
574 \&\fB.gnu_debugaltlink\fR and \fB.debug_sup\fR sections, if any of
575 them are present. Also displays any links to separate dwarf object
576 files (dwo), if they are specified by the DW_AT_GNU_dwo_name or
577 DW_AT_dwo_name attributes in the \fB.debug_info\fR section.
578 .ie n .IP """K""" 4
579 .el .IP \f(CWK\fR 4
580 .IX Item "K"
581 .PD 0
582 .ie n .IP """=follow\-links""" 4
583 .el .IP \f(CW=follow\-links\fR 4
584 .IX Item "=follow-links"
585 .PD
586 Display the contents of any selected debug sections that are found in
587 linked, separate debug info file(s). This can result in multiple
588 versions of the same debug section being displayed if it exists in
589 more than one file.
590 .Sp
591 In addition, when displaying DWARF attributes, if a form is found that
592 references the separate debug info file, then the referenced contents
593 will also be displayed.
594 .Sp
595 Note \- in some distributions this option is enabled by default. It
596 can be disabled via the \fBN\fR debug option. The default can be
597 chosen when configuring the binutils via the
598 \&\fB\-\-enable\-follow\-debug\-links=yes\fR or
599 \&\fB\-\-enable\-follow\-debug\-links=no\fR options. If these are not
600 used then the default is to enable the following of debug links.
601 .Sp
602 Note \- if support for the debuginfod protocol was enabled when the
603 binutils were built then this option will also include an attempt to
604 contact any debuginfod servers mentioned in the \fIDEBUGINFOD_URLS\fR
605 environment variable. This could take some time to resolve. This
606 behaviour can be disabled via the \fB=do\-not\-use\-debuginfod\fR debug
607 option.
608 .ie n .IP """N""" 4
609 .el .IP \f(CWN\fR 4
610 .IX Item "N"
611 .PD 0
612 .ie n .IP """=no\-follow\-links""" 4
613 .el .IP \f(CW=no\-follow\-links\fR 4
614 .IX Item "=no-follow-links"
615 .PD
616 Disables the following of links to separate debug info files.
617 .ie n .IP """D""" 4
618 .el .IP \f(CWD\fR 4
619 .IX Item "D"
620 .PD 0
621 .ie n .IP """=use\-debuginfod""" 4
622 .el .IP \f(CW=use\-debuginfod\fR 4
623 .IX Item "=use-debuginfod"
624 .PD
625 Enables contacting debuginfod servers if there is a need to follow
626 debug links. This is the default behaviour.
627 .ie n .IP """E""" 4
628 .el .IP \f(CWE\fR 4
629 .IX Item "E"
630 .PD 0
631 .ie n .IP """=do\-not\-use\-debuginfod""" 4
632 .el .IP \f(CW=do\-not\-use\-debuginfod\fR 4
633 .IX Item "=do-not-use-debuginfod"
634 .PD
635 Disables contacting debuginfod servers when there is a need to follow
636 debug links.
637 .ie n .IP """l""" 4
638 .el .IP \f(CWl\fR 4
639 .IX Item "l"
640 .PD 0
641 .ie n .IP """=rawline""" 4
642 .el .IP \f(CW=rawline\fR 4
643 .IX Item "=rawline"
644 .PD
645 Displays the contents of the \fB.debug_line\fR section in a raw
646 format.
647 .ie n .IP """L""" 4
648 .el .IP \f(CWL\fR 4
649 .IX Item "L"
650 .PD 0
651 .ie n .IP """=decodedline""" 4
652 .el .IP \f(CW=decodedline\fR 4
653 .IX Item "=decodedline"
654 .PD
655 Displays the interpreted contents of the \fB.debug_line\fR section.
656 .ie n .IP """m""" 4
657 .el .IP \f(CWm\fR 4
658 .IX Item "m"
659 .PD 0
660 .ie n .IP """=macro""" 4
661 .el .IP \f(CW=macro\fR 4
662 .IX Item "=macro"
663 .PD
664 Displays the contents of the \fB.debug_macro\fR and/or
665 \&\fB.debug_macinfo\fR sections.
666 .ie n .IP """o""" 4
667 .el .IP \f(CWo\fR 4
668 .IX Item "o"
669 .PD 0
670 .ie n .IP """=loc""" 4
671 .el .IP \f(CW=loc\fR 4
672 .IX Item "=loc"
673 .PD
674 Displays the contents of the \fB.debug_loc\fR and/or
675 \&\fB.debug_loclists\fR sections.
676 .ie n .IP """O""" 4
677 .el .IP \f(CWO\fR 4
678 .IX Item "O"
679 .PD 0
680 .ie n .IP """=str\-offsets""" 4
681 .el .IP \f(CW=str\-offsets\fR 4
682 .IX Item "=str-offsets"
683 .PD
684 Displays the contents of the \fB.debug_str_offsets\fR section.
685 .ie n .IP """p""" 4
686 .el .IP \f(CWp\fR 4
687 .IX Item "p"
688 .PD 0
689 .ie n .IP """=pubnames""" 4
690 .el .IP \f(CW=pubnames\fR 4
691 .IX Item "=pubnames"
692 .PD
693 Displays the contents of the \fB.debug_pubnames\fR and/or
694 \&\fB.debug_gnu_pubnames\fR sections.
695 .ie n .IP """r""" 4
696 .el .IP \f(CWr\fR 4
697 .IX Item "r"
698 .PD 0
699 .ie n .IP """=aranges""" 4
700 .el .IP \f(CW=aranges\fR 4
701 .IX Item "=aranges"
702 .PD
703 Displays the contents of the \fB.debug_aranges\fR section.
704 .ie n .IP """R""" 4
705 .el .IP \f(CWR\fR 4
706 .IX Item "R"
707 .PD 0
708 .ie n .IP """=Ranges""" 4
709 .el .IP \f(CW=Ranges\fR 4
710 .IX Item "=Ranges"
711 .PD
712 Displays the contents of the \fB.debug_ranges\fR and/or
713 \&\fB.debug_rnglists\fR sections.
714 .ie n .IP """s""" 4
715 .el .IP \f(CWs\fR 4
716 .IX Item "s"
717 .PD 0
718 .ie n .IP """=str""" 4
719 .el .IP \f(CW=str\fR 4
720 .IX Item "=str"
721 .PD
722 Displays the contents of the \fB.debug_str\fR, \fB.debug_line_str\fR
723 and/or \fB.debug_str_offsets\fR sections.
724 .ie n .IP """t""" 4
725 .el .IP \f(CWt\fR 4
726 .IX Item "t"
727 .PD 0
728 .ie n .IP """=pubtype""" 4
729 .el .IP \f(CW=pubtype\fR 4
730 .IX Item "=pubtype"
731 .PD
732 Displays the contents of the \fB.debug_pubtypes\fR and/or
733 \&\fB.debug_gnu_pubtypes\fR sections.
734 .ie n .IP """T""" 4
735 .el .IP \f(CWT\fR 4
736 .IX Item "T"
737 .PD 0
738 .ie n .IP """=trace_aranges""" 4
739 .el .IP \f(CW=trace_aranges\fR 4
740 .IX Item "=trace_aranges"
741 .PD
742 Displays the contents of the \fB.trace_aranges\fR section.
743 .ie n .IP """u""" 4
744 .el .IP \f(CWu\fR 4
745 .IX Item "u"
746 .PD 0
747 .ie n .IP """=trace_abbrev""" 4
748 .el .IP \f(CW=trace_abbrev\fR 4
749 .IX Item "=trace_abbrev"
750 .PD
751 Displays the contents of the \fB.trace_abbrev\fR section.
752 .ie n .IP """U""" 4
753 .el .IP \f(CWU\fR 4
754 .IX Item "U"
755 .PD 0
756 .ie n .IP """=trace_info""" 4
757 .el .IP \f(CW=trace_info\fR 4
758 .IX Item "=trace_info"
759 .PD
760 Displays the contents of the \fB.trace_info\fR section.
761 .RE
762 .RS 4
763 .Sp
764 Note: displaying the contents of \fB.debug_static_funcs\fR,
765 \&\fB.debug_static_vars\fR and \fBdebug_weaknames\fR sections is not
766 currently supported.
767 .RE
768 .IP \fB\-\-dwarf\-depth=\fR\fIn\fR 4
769 .IX Item "--dwarf-depth=n"
770 Limit the dump of the \f(CW\*(C`.debug_info\*(C'\fR section to \fIn\fR children.
771 This is only useful with \fB\-\-debug\-dump=info\fR. The default is
772 to print all DIEs; the special value 0 for \fIn\fR will also have this
773 effect.
774 .Sp
775 With a non\-zero value for \fIn\fR, DIEs at or deeper than \fIn\fR
776 levels will not be printed. The range for \fIn\fR is zero\-based.
777 .IP \fB\-\-dwarf\-start=\fR\fIn\fR 4
778 .IX Item "--dwarf-start=n"
779 Print only DIEs beginning with the DIE numbered \fIn\fR. This is only
780 useful with \fB\-\-debug\-dump=info\fR.
781 .Sp
782 If specified, this option will suppress printing of any header
783 information and all DIEs before the DIE numbered \fIn\fR. Only
784 siblings and children of the specified DIE will be printed.
785 .Sp
786 This can be used in conjunction with \fB\-\-dwarf\-depth\fR.
787 .IP \fB\-\-debug\-dir=\fR\f(BIdir\fR 4
788 .IX Item "--debug-dir=dir"
789 Search \fIdir\fR when looking for separate debug info files.
790 .IP \fB\-P\fR 4
791 .IX Item "-P"
792 .PD 0
793 .IP \fB\-\-process\-links\fR 4
794 .IX Item "--process-links"
795 .PD
796 Display the contents of non\-debug sections found in separate debuginfo
797 files that are linked to the main file. This option automatically
798 implies the \fB\-wK\fR option, and only sections requested by other
799 command line options will be displayed.
800 .IP \fB\-\-ctf[=\fR\fIsection\fR\fB]\fR 4
801 .IX Item "--ctf[=section]"
802 Display the contents of the specified CTF section. CTF sections themselves
803 contain many subsections, all of which are displayed in order.
804 .Sp
805 By default, display the name of the section named \fI.ctf\fR, which is the
806 name emitted by \fBld\fR.
807 .IP \fB\-\-ctf\-parent=\fR\fImember\fR 4
808 .IX Item "--ctf-parent=member"
809 If the CTF section contains ambiguously\-defined types, it will consist
810 of an archive of many CTF dictionaries, all inheriting from one
811 dictionary containing unambiguous types. This member is by default
812 named \fI.ctf\fR, like the section containing it, but it is possible to
813 change this name using the \f(CW\*(C`ctf_link_set_memb_name_changer\*(C'\fR
814 function at link time. When looking at CTF archives that have been
815 created by a linker that uses the name changer to rename the parent
816 archive member, \fB\-\-ctf\-parent\fR can be used to specify the name
817 used for the parent.
818 .IP \fB\-\-ctf\-parent\-section=\fR\fIsection\fR 4
819 .IX Item "--ctf-parent-section=section"
820 This option lets you pick a completely different section for the CTF
821 parent dictionary containing unambiguous types than for the child
822 dictionaries that contain the ambiguous remainder. The linker does
823 not emit ELF objects structured like this, but some third\-party linkers
824 may. It\*(Aqs also convenient to inspect CTF written out as multiple raw
825 files to compose them with objcopy, which can put them in different
826 ELF sections but not in different members of a single CTF dict.
827 .IP \fB\-\-ctf\-symbols=\fR\fIsection\fR 4
828 .IX Item "--ctf-symbols=section"
829 .PD 0
830 .IP \fB\-\-ctf\-strings=\fR\fIsection\fR 4
831 .IX Item "--ctf-strings=section"
832 .PD
833 Specify the name of another section from which the CTF file can inherit
834 strings and symbols. By default, the \f(CW\*(C`.symtab\*(C'\fR and its linked
835 string table are used.
836 .Sp
837 If either of \fB\-\-ctf\-symbols\fR or \fB\-\-ctf\-strings\fR is specified, the
838 other must be specified as well.
839 .IP \fB\-\-got\-contents\fR 4
840 .IX Item "--got-contents"
841 Displays the contents of the file\*(Aqs Global Offset Table (GOT) sections,
842 if it has any. For MIPS, this option is similar to
843 \&\fB\-\-arch\-specific\fR, but it only displays the GOT related contents
844 and it is ignored when \fB\-\-arch\-specific\fR is used.
845 .IP \fB\-I\fR 4
846 .IX Item "-I"
847 .PD 0
848 .IP \fB\-\-histogram\fR 4
849 .IX Item "--histogram"
850 .PD
851 Display a histogram of bucket list lengths when displaying the contents
852 of the symbol tables.
853 .IP \fB\-v\fR 4
854 .IX Item "-v"
855 .PD 0
856 .IP \fB\-\-version\fR 4
857 .IX Item "--version"
858 .PD
859 Display the version number of readelf.
860 .IP \fB\-W\fR 4
861 .IX Item "-W"
862 .PD 0
863 .IP \fB\-\-wide\fR 4
864 .IX Item "--wide"
865 .PD
866 Don\*(Aqt break output lines to fit into 80 columns. By default
867 \&\fBreadelf\fR breaks section header and segment listing lines for
868 64\-bit ELF files, so that they fit into 80 columns. This option causes
869 \&\fBreadelf\fR to print each section header resp. each segment one a
870 single line, which is far more readable on terminals wider than 80 columns.
871 .IP \fB\-T\fR 4
872 .IX Item "-T"
873 .PD 0
874 .IP \fB\-\-silent\-truncation\fR 4
875 .IX Item "--silent-truncation"
876 .PD
877 Normally when readelf is displaying a symbol name, and it has to
878 truncate the name to fit into an 80 column display, it will add a
879 suffix of \f(CW\*(C`[...]\*(C'\fR to the name. This command line option
880 disables this behaviour, allowing 5 more characters of the name to be
881 displayed and restoring the old behaviour of readelf (prior to release
882 2.35).
883 .IP \fB\-H\fR 4
884 .IX Item "-H"
885 .PD 0
886 .IP \fB\-\-help\fR 4
887 .IX Item "--help"
888 .PD
889 Display the command\-line options understood by \fBreadelf\fR.
890 .IP \fB@\fR\fIfile\fR 4
891 .IX Item "@file"
892 Read command\-line options from \fIfile\fR. The options read are
893 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
894 does not exist, or cannot be read, then the option will be treated
895 literally, and not removed.
896 .Sp
897 Options in \fIfile\fR are separated by whitespace. A whitespace
898 character may be included in an option by surrounding the entire
899 option in either single or double quotes. Any character (including a
900 backslash) may be included by prefixing the character to be included
901 with a backslash. The \fIfile\fR may itself contain additional
902 @\fIfile\fR options; any such options will be processed recursively.
903 .SH "SEE ALSO"
904 .IX Header "SEE ALSO"
905 \&\fBobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
906 .SH COPYRIGHT
907 .IX Header "COPYRIGHT"
908 Copyright (c) 1991\-2026 Free Software Foundation, Inc.
909 .PP
910 Permission is granted to copy, distribute and/or modify this document
911 under the terms of the GNU Free Documentation License, Version 1.3
912 or any later version published by the Free Software Foundation;
913 with no Invariant Sections, with no Front\-Cover Texts, and with no
914 Back\-Cover Texts. A copy of the license is included in the
915 section entitled "GNU Free Documentation License".