1READELF(1)                   GNU Development Tools                  READELF(1)
2
3
4

NAME

6       readelf - Displays information about ELF files.
7

SYNOPSIS

9       readelf [-a|--all]
10               [-h|--file-header]
11               [-l|--program-headers|--segments]
12               [-S|--section-headers|--sections]
13               [-g|--section-groups]
14               [-t|--section-details]
15               [-e|--headers]
16               [-s|--syms|--symbols]
17               [--dyn-syms]
18               [-n|--notes]
19               [-r|--relocs]
20               [-u|--unwind]
21               [-d|--dynamic]
22               [-V|--version-info]
23               [-A|--arch-specific]
24               [-D|--use-dynamic]
25               [-x <number or name>|--hex-dump=<number or name>]
26               [-p <number or name>|--string-dump=<number or name>]
27               [-R <number or name>|--relocated-dump=<number or name>]
28               [-z|--decompress]
29               [-c|--archive-index]
30               [-w[lLiaprmfFsoRtUuTgAckK]|
31                --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
32               [--dwarf-depth=n]
33               [--dwarf-start=n]
34               [-I|--histogram]
35               [-v|--version]
36               [-W|--wide]
37               [-H|--help]
38               elffile...
39

DESCRIPTION

41       readelf displays information about one or more ELF format object files.
42       The options control what particular information to display.
43
44       elffile... are the object files to be examined.  32-bit and 64-bit ELF
45       files are supported, as are archives containing ELF files.
46
47       This program performs a similar function to objdump but it goes into
48       more detail and it exists independently of the BFD library, so if there
49       is a bug in BFD then readelf will not be affected.
50

OPTIONS

52       The long and short forms of options, shown here as alternatives, are
53       equivalent.  At least one option besides -v or -H must be given.
54
55       -a
56       --all
57           Equivalent to specifying --file-header, --program-headers,
58           --sections, --symbols, --relocs, --dynamic, --notes,
59           --version-info, --arch-specific, --unwind, --section-groups and
60           --histogram.
61
62           Note - this option does not enable --use-dynamic itself, so if that
63           option is not present on the command line then dynamic symbols and
64           dynamic relocs will not be displayed.
65
66       -h
67       --file-header
68           Displays the information contained in the ELF header at the start
69           of the file.
70
71       -l
72       --program-headers
73       --segments
74           Displays the information contained in the file's segment headers,
75           if it has any.
76
77       -S
78       --sections
79       --section-headers
80           Displays the information contained in the file's section headers,
81           if it has any.
82
83       -g
84       --section-groups
85           Displays the information contained in the file's section groups, if
86           it has any.
87
88       -t
89       --section-details
90           Displays the detailed section information. Implies -S.
91
92       -s
93       --symbols
94       --syms
95           Displays the entries in symbol table section of the file, if it has
96           one.  If a symbol has version information associated with it then
97           this is displayed as well.  The version string is displayed as a
98           suffix to the symbol name, preceeded by an @ character.  For
99           example foo@VER_1.  If the version is the default version to be
100           used when resolving unversioned references to the symbol then it is
101           displayed as a suffix preceeded by two @ characters.  For example
102           foo@@VER_2.
103
104       --dyn-syms
105           Displays the entries in dynamic symbol table section of the file,
106           if it has one.  The output format is the same as the format used by
107           the --syms option.
108
109       -e
110       --headers
111           Display all the headers in the file.  Equivalent to -h -l -S.
112
113       -n
114       --notes
115           Displays the contents of the NOTE segments and/or sections, if any.
116
117       -r
118       --relocs
119           Displays the contents of the file's relocation section, if it has
120           one.
121
122       -u
123       --unwind
124           Displays the contents of the file's unwind section, if it has one.
125           Only the unwind sections for IA64 ELF files, as well as ARM unwind
126           tables (".ARM.exidx" / ".ARM.extab") are currently supported.  If
127           support is not yet implemented for your architecture you could try
128           dumping the contents of the .eh_frames section using the
129           --debug-dump=frames or --debug-dump=frames-interp options.
130
131       -d
132       --dynamic
133           Displays the contents of the file's dynamic section, if it has one.
134
135       -V
136       --version-info
137           Displays the contents of the version sections in the file, it they
138           exist.
139
140       -A
141       --arch-specific
142           Displays architecture-specific information in the file, if there is
143           any.
144
145       -D
146       --use-dynamic
147           When displaying symbols, this option makes readelf use the symbol
148           hash tables in the file's dynamic section, rather than the symbol
149           table sections.
150
151           When displaying relocations, this option makes readelf display the
152           dynamic relocations rather than the static relocations.
153
154       -x <number or name>
155       --hex-dump=<number or name>
156           Displays the contents of the indicated section as a hexadecimal
157           bytes.  A number identifies a particular section by index in the
158           section table; any other string identifies all sections with that
159           name in the object file.
160
161       -R <number or name>
162       --relocated-dump=<number or name>
163           Displays the contents of the indicated section as a hexadecimal
164           bytes.  A number identifies a particular section by index in the
165           section table; any other string identifies all sections with that
166           name in the object file.  The contents of the section will be
167           relocated before they are displayed.
168
169       -p <number or name>
170       --string-dump=<number or name>
171           Displays the contents of the indicated section as printable
172           strings.  A number identifies a particular section by index in the
173           section table; any other string identifies all sections with that
174           name in the object file.
175
176       -z
177       --decompress
178           Requests that the section(s) being dumped by x, R or p options are
179           decompressed before being displayed.  If the section(s) are not
180           compressed then they are displayed as is.
181
182       -c
183       --archive-index
184           Displays the file symbol index information contained in the header
185           part of binary archives.  Performs the same function as the t
186           command to ar, but without using the BFD library.
187
188       -w[lLiaprmfFsoRtUuTgAckK]
189       --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]
190           Displays the contents of the DWARF debug sections in the file, if
191           any are present.  Compressed debug sections are automatically
192           decompressed (temporarily) before they are displayed.  If one or
193           more of the optional letters or words follows the switch then only
194           those type(s) of data will be dumped.  The letters and words refer
195           to the following information:
196
197           "a"
198           "=abbrev"
199               Displays the contents of the .debug_abbrev section.
200
201           "A"
202           "=addr"
203               Displays the contents of the .debug_addr section.
204
205           "c"
206           "=cu_index"
207               Displays the contents of the .debug_cu_index and/or
208               .debug_tu_index sections.
209
210           "f"
211           "=frames"
212               Display the raw contents of a .debug_frame section.
213
214           "F"
215           "=frame-interp"
216               Display the interpreted contents of a .debug_frame section.
217
218           "g"
219           "=gdb_index"
220               Displays the contents of the .gdb_index and/or .debug_names
221               sections.
222
223           "i"
224           "=info"
225               Displays the contents of the .debug_info section.  Note: the
226               output from this option can also be restricted by the use of
227               the --dwarf-depth and --dwarf-start options.
228
229           "k"
230           "=links"
231               Displays the contents of the .gnu_debuglink and/or
232               .gnu_debugaltlink sections.  Also displays the link to a
233               separate dwarf object file (dwo), if one is specified by the
234               DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the
235               .debug_info section.
236
237           "K"
238           "=follow-links"
239               Display the contents of any selected debug sections that are
240               found in a linked, separate debug info file.  This can result
241               in multiple versions of the same debug section being displayed
242               if both the main file and the separate debug info file contain
243               sections with the same name.
244
245               In addition, when displaying DWARF attributes, if a form is
246               found that references the separate debug info file, then the
247               referenced contents will also be displayed.
248
249           "l"
250           "=rawline"
251               Displays the contents of the .debug_line section in a raw
252               format.
253
254           "L"
255           "=decodedline"
256               Displays the interpreted contents of the .debug_line section.
257
258           "m"
259           "=macro"
260               Displays the contents of the .debug_macro and/or .debug_macinfo
261               sections.
262
263           "o"
264           "=loc"
265               Displays the contents of the .debug_loc and/or .debug_loclists
266               sections.
267
268           "p"
269           "=pubnames"
270               Displays the contents of the .debug_pubnames and/or
271               .debug_gnu_pubnames sections.
272
273           "r"
274           "=aranges"
275               Displays the contents of the .debug_aranges section.
276
277           "R"
278           "=Ranges"
279               Displays the contents of the .debug_ranges and/or
280               .debug_rnglists sections.
281
282           "s"
283           "=str"
284               Displays the contents of the .debug_str, .debug_line_str and/or
285               .debug_str_offsets sections.
286
287           "t"
288           "=pubtype"
289               Displays the contents of the .debug_pubtypes and/or
290               .debug_gnu_pubtypes sections.
291
292           "T"
293           "=trace_aranges"
294               Displays the contents of the .trace_aranges section.
295
296           "u"
297           "=trace_abbrev"
298               Displays the contents of the .trace_abbrev section.
299
300           "U"
301           "=trace_info"
302               Displays the contents of the .trace_info section.
303
304           Note: displaying the contents of .debug_static_funcs,
305           .debug_static_vars and debug_weaknames sections is not currently
306           supported.
307
308       --dwarf-depth=n
309           Limit the dump of the ".debug_info" section to n children.  This is
310           only useful with --debug-dump=info.  The default is to print all
311           DIEs; the special value 0 for n will also have this effect.
312
313           With a non-zero value for n, DIEs at or deeper than n levels will
314           not be printed.  The range for n is zero-based.
315
316       --dwarf-start=n
317           Print only DIEs beginning with the DIE numbered n.  This is only
318           useful with --debug-dump=info.
319
320           If specified, this option will suppress printing of any header
321           information and all DIEs before the DIE numbered n.  Only siblings
322           and children of the specified DIE will be printed.
323
324           This can be used in conjunction with --dwarf-depth.
325
326       -I
327       --histogram
328           Display a histogram of bucket list lengths when displaying the
329           contents of the symbol tables.
330
331       -v
332       --version
333           Display the version number of readelf.
334
335       -W
336       --wide
337           Don't break output lines to fit into 80 columns. By default readelf
338           breaks section header and segment listing lines for 64-bit ELF
339           files, so that they fit into 80 columns. This option causes readelf
340           to print each section header resp. each segment one a single line,
341           which is far more readable on terminals wider than 80 columns.
342
343       -H
344       --help
345           Display the command-line options understood by readelf.
346
347       @file
348           Read command-line options from file.  The options read are inserted
349           in place of the original @file option.  If file does not exist, or
350           cannot be read, then the option will be treated literally, and not
351           removed.
352
353           Options in file are separated by whitespace.  A whitespace
354           character may be included in an option by surrounding the entire
355           option in either single or double quotes.  Any character (including
356           a backslash) may be included by prefixing the character to be
357           included with a backslash.  The file may itself contain additional
358           @file options; any such options will be processed recursively.
359

SEE ALSO

361       objdump(1), and the Info entries for binutils.
362
364       Copyright (c) 1991-2019 Free Software Foundation, Inc.
365
366       Permission is granted to copy, distribute and/or modify this document
367       under the terms of the GNU Free Documentation License, Version 1.3 or
368       any later version published by the Free Software Foundation; with no
369       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
370       Texts.  A copy of the license is included in the section entitled "GNU
371       Free Documentation License".
372
373
374
375binutils-2.31.90                  2019-01-19                        READELF(1)
Impressum