Debian Codegraph @

upstream/debian-trixie/man1/readelf.1

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