Debian Codegraph @

upstream/mageia-cauldron/man1/readelf.1

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