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[lLiaprmfFsoRt]|
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]]
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 and
59           --version-info.
60
61       -h
62       --file-header
63           Displays the information contained in the ELF header at the start
64           of the file.
65
66       -l
67       --program-headers
68       --segments
69           Displays the information contained in the file's segment headers,
70           if it has any.
71
72       -S
73       --sections
74       --section-headers
75           Displays the information contained in the file's section headers,
76           if it has any.
77
78       -g
79       --section-groups
80           Displays the information contained in the file's section groups, if
81           it has any.
82
83       -t
84       --section-details
85           Displays the detailed section information. Implies -S.
86
87       -s
88       --symbols
89       --syms
90           Displays the entries in symbol table section of the file, if it has
91           one.
92
93       --dyn-syms
94           Displays the entries in dynamic symbol table section of the file,
95           if it has one.
96
97       -e
98       --headers
99           Display all the headers in the file.  Equivalent to -h -l -S.
100
101       -n
102       --notes
103           Displays the contents of the NOTE segments and/or sections, if any.
104
105       -r
106       --relocs
107           Displays the contents of the file's relocation section, if it has
108           one.
109
110       -u
111       --unwind
112           Displays the contents of the file's unwind section, if it has one.
113           Only the unwind sections for IA64 ELF files, as well as ARM unwind
114           tables (".ARM.exidx" / ".ARM.extab") are currently supported.
115
116       -d
117       --dynamic
118           Displays the contents of the file's dynamic section, if it has one.
119
120       -V
121       --version-info
122           Displays the contents of the version sections in the file, it they
123           exist.
124
125       -A
126       --arch-specific
127           Displays architecture-specific information in the file, if there is
128           any.
129
130       -D
131       --use-dynamic
132           When displaying symbols, this option makes readelf use the symbol
133           hash tables in the file's dynamic section, rather than the symbol
134           table sections.
135
136       -x <number or name>
137       --hex-dump=<number or name>
138           Displays the contents of the indicated section as a hexadecimal
139           bytes.  A number identifies a particular section by index in the
140           section table; any other string identifies all sections with that
141           name in the object file.
142
143       -R <number or name>
144       --relocated-dump=<number or name>
145           Displays the contents of the indicated section as a hexadecimal
146           bytes.  A number identifies a particular section by index in the
147           section table; any other string identifies all sections with that
148           name in the object file.  The contents of the section will be
149           relocated before they are displayed.
150
151       -p <number or name>
152       --string-dump=<number or name>
153           Displays the contents of the indicated section as printable
154           strings.  A number identifies a particular section by index in the
155           section table; any other string identifies all sections with that
156           name in the object file.
157
158       -z
159       --decompress
160           Requests that the section(s) being dumped by x, R or p options are
161           decompressed before being displayed.  If the section(s) are not
162           compressed then they are displayed as is.
163
164       -c
165       --archive-index
166           Displays the file symbol index information contained in the header
167           part of binary archives.  Performs the same function as the t
168           command to ar, but without using the BFD library.
169
170       -w[lLiaprmfFsoRt]
171       --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]
172           Displays the contents of the debug sections in the file, if any are
173           present.  If one of the optional letters or words follows the
174           switch then only data found in those specific sections will be
175           dumped.
176
177           Note that there is no single letter option to display the content
178           of trace sections or .gdb_index.
179
180           Note: the =decodedline option will display the interpreted contents
181           of a .debug_line section whereas the =rawline option dumps the
182           contents in a raw format.
183
184           Note: the =frames-interp option will display the interpreted
185           contents of a .debug_frame section whereas the =frames option dumps
186           the contents in a raw format.
187
188           Note: the output from the =info option can also be affected by the
189           options --dwarf-depth and --dwarf-start.
190
191       --dwarf-depth=n
192           Limit the dump of the ".debug_info" section to n children.  This is
193           only useful with --debug-dump=info.  The default is to print all
194           DIEs; the special value 0 for n will also have this effect.
195
196           With a non-zero value for n, DIEs at or deeper than n levels will
197           not be printed.  The range for n is zero-based.
198
199       --dwarf-start=n
200           Print only DIEs beginning with the DIE numbered n.  This is only
201           useful with --debug-dump=info.
202
203           If specified, this option will suppress printing of any header
204           information and all DIEs before the DIE numbered n.  Only siblings
205           and children of the specified DIE will be printed.
206
207           This can be used in conjunction with --dwarf-depth.
208
209       -I
210       --histogram
211           Display a histogram of bucket list lengths when displaying the
212           contents of the symbol tables.
213
214       -v
215       --version
216           Display the version number of readelf.
217
218       -W
219       --wide
220           Don't break output lines to fit into 80 columns. By default readelf
221           breaks section header and segment listing lines for 64-bit ELF
222           files, so that they fit into 80 columns. This option causes readelf
223           to print each section header resp. each segment one a single line,
224           which is far more readable on terminals wider than 80 columns.
225
226       -H
227       --help
228           Display the command line options understood by readelf.
229
230       @file
231           Read command-line options from file.  The options read are inserted
232           in place of the original @file option.  If file does not exist, or
233           cannot be read, then the option will be treated literally, and not
234           removed.
235
236           Options in file are separated by whitespace.  A whitespace
237           character may be included in an option by surrounding the entire
238           option in either single or double quotes.  Any character (including
239           a backslash) may be included by prefixing the character to be
240           included with a backslash.  The file may itself contain additional
241           @file options; any such options will be processed recursively.
242

SEE ALSO

244       objdump(1), and the Info entries for binutils.
245
247       Copyright (c) 1991-2016 Free Software Foundation, Inc.
248
249       Permission is granted to copy, distribute and/or modify this document
250       under the terms of the GNU Free Documentation License, Version 1.3 or
251       any later version published by the Free Software Foundation; with no
252       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
253       Texts.  A copy of the license is included in the section entitled "GNU
254       Free Documentation License".
255
256
257
258binutils-2.27                     2016-08-03                        READELF(1)
Impressum