Debian Codegraph @

upstream/fedora-44/man1/readelf.1

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