1READELF(1) GNU Development Tools READELF(1)
2
3
4
6 readelf - Displays information about ELF files.
7
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 [-n|--notes]
18 [-r|--relocs]
19 [-u|--unwind]
20 [-d|--dynamic]
21 [-V|--version-info]
22 [-A|--arch-specific]
23 [-D|--use-dynamic]
24 [-x <number or name>|--hex-dump=<number or name>]
25 [-p <number or name>|--string-dump=<number or name>]
26 [-R <number or name>|--relocated-dump=<number or name>]
27 [-c|--archive-index]
28 [-w[lLiaprmfFsoR]|
29 --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
30 [-I|-histogram]
31 [-v|--version]
32 [-W|--wide]
33 [-H|--help]
34 elffile...
35
37 readelf displays information about one or more ELF format object files.
38 The options control what particular information to display.
39
40 elffile... are the object files to be examined. 32-bit and 64-bit ELF
41 files are supported, as are archives containing ELF files.
42
43 This program performs a similar function to objdump but it goes into
44 more detail and it exists independently of the BFD library, so if there
45 is a bug in BFD then readelf will not be affected.
46
48 The long and short forms of options, shown here as alternatives, are
49 equivalent. At least one option besides -v or -H must be given.
50
51 -a
52 --all
53 Equivalent to specifying --file-header, --program-headers,
54 --sections, --symbols, --relocs, --dynamic, --notes and
55 --version-info.
56
57 -h
58 --file-header
59 Displays the information contained in the ELF header at the start
60 of the file.
61
62 -l
63 --program-headers
64 --segments
65 Displays the information contained in the file's segment headers,
66 if it has any.
67
68 -S
69 --sections
70 --section-headers
71 Displays the information contained in the file's section headers,
72 if it has any.
73
74 -g
75 --section-groups
76 Displays the information contained in the file's section groups, if
77 it has any.
78
79 -t
80 --section-details
81 Displays the detailed section information. Implies -S.
82
83 -s
84 --symbols
85 --syms
86 Displays the entries in symbol table section of the file, if it has
87 one.
88
89 -e
90 --headers
91 Display all the headers in the file. Equivalent to -h -l -S.
92
93 -n
94 --notes
95 Displays the contents of the NOTE segments and/or sections, if any.
96
97 -r
98 --relocs
99 Displays the contents of the file's relocation section, if it has
100 one.
101
102 -u
103 --unwind
104 Displays the contents of the file's unwind section, if it has one.
105 Only the unwind sections for IA64 ELF files are currently
106 supported.
107
108 -d
109 --dynamic
110 Displays the contents of the file's dynamic section, if it has one.
111
112 -V
113 --version-info
114 Displays the contents of the version sections in the file, it they
115 exist.
116
117 -A
118 --arch-specific
119 Displays architecture-specific information in the file, if there is
120 any.
121
122 -D
123 --use-dynamic
124 When displaying symbols, this option makes readelf use the symbol
125 table in the file's dynamic section, rather than the one in the
126 symbols section.
127
128 -x <number or name>
129 --hex-dump=<number or name>
130 Displays the contents of the indicated section as a hexadecimal
131 bytes. A number identifies a particular section by index in the
132 section table; any other string identifies all sections with that
133 name in the object file.
134
135 -R <number or name>
136 --relocated-dump=<number or name>
137 Displays the contents of the indicated section as a hexadecimal
138 bytes. A number identifies a particular section by index in the
139 section table; any other string identifies all sections with that
140 name in the object file. The contents of the section will be
141 relocated before they are displayed.
142
143 -p <number or name>
144 --string-dump=<number or name>
145 Displays the contents of the indicated section as printable
146 strings. 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.
149
150 -c
151 --archive-index
152 Displays the file symbol index infomation contained in the header
153 part of binary archives. Performs the same function as the t
154 command to ar, but without using the BFD library.
155
156 -w[lLiaprmfFsoR]
157 --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]
158 Displays the contents of the debug sections in the file, if any are
159 present. If one of the optional letters or words follows the
160 switch then only data found in those specific sections will be
161 dumped.
162
163 Note: the =decodedline option will display the interpreted contents
164 of a .debug_line section whereas the =rawline option dumps the
165 contents in a raw format.
166
167 -I
168 --histogram
169 Display a histogram of bucket list lengths when displaying the
170 contents of the symbol tables.
171
172 -v
173 --version
174 Display the version number of readelf.
175
176 -W
177 --wide
178 Don't break output lines to fit into 80 columns. By default readelf
179 breaks section header and segment listing lines for 64-bit ELF
180 files, so that they fit into 80 columns. This option causes readelf
181 to print each section header resp. each segment one a single line,
182 which is far more readable on terminals wider than 80 columns.
183
184 -H
185 --help
186 Display the command line options understood by readelf.
187
188 @file
189 Read command-line options from file. The options read are inserted
190 in place of the original @file option. If file does not exist, or
191 cannot be read, then the option will be treated literally, and not
192 removed.
193
194 Options in file are separated by whitespace. A whitespace
195 character may be included in an option by surrounding the entire
196 option in either single or double quotes. Any character (including
197 a backslash) may be included by prefixing the character to be
198 included with a backslash. The file may itself contain additional
199 @file options; any such options will be processed recursively.
200
202 objdump(1), and the Info entries for binutils.
203
205 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
206 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
207 Software Foundation, Inc.
208
209 Permission is granted to copy, distribute and/or modify this document
210 under the terms of the GNU Free Documentation License, Version 1.3 or
211 any later version published by the Free Software Foundation; with no
212 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
213 Texts. A copy of the license is included in the section entitled "GNU
214 Free Documentation License".
215
216
217
218binutils-2.20.51.0.2 2019-02-26 READELF(1)