Merge branch 'vendor/LESS'
[dragonfly.git] / contrib / binutils-2.21 / binutils / doc / readelf.1
1 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el       .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD.  Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 .    de IX
53 .    tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 .    nr % 0
56 .    rr F
57 .\}
58 .el \{\
59 .    de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
65 .    \" fudge factors for nroff and troff
66 .if n \{\
67 .    ds #H 0
68 .    ds #V .8m
69 .    ds #F .3m
70 .    ds #[ \f1
71 .    ds #] \fP
72 .\}
73 .if t \{\
74 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 .    ds #V .6m
76 .    ds #F 0
77 .    ds #[ \&
78 .    ds #] \&
79 .\}
80 .    \" simple accents for nroff and troff
81 .if n \{\
82 .    ds ' \&
83 .    ds ` \&
84 .    ds ^ \&
85 .    ds , \&
86 .    ds ~ ~
87 .    ds /
88 .\}
89 .if t \{\
90 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 .    \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 .    \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 .    \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 .    ds : e
114 .    ds 8 ss
115 .    ds o a
116 .    ds d- d\h'-1'\(ga
117 .    ds D- D\h'-1'\(hy
118 .    ds th \o'bp'
119 .    ds Th \o'LP'
120 .    ds ae ae
121 .    ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "READELF 1"
127 .TH READELF 1 "2011-03-14" "binutils-2.21.0" "GNU Development Tools"
128 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 readelf \- Displays information about ELF files.
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 readelf [\fB\-a\fR|\fB\-\-all\fR]
137         [\fB\-h\fR|\fB\-\-file\-header\fR]
138         [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
139         [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
140         [\fB\-g\fR|\fB\-\-section\-groups\fR]
141         [\fB\-t\fR|\fB\-\-section\-details\fR]
142         [\fB\-e\fR|\fB\-\-headers\fR]
143         [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
144         [\fB\-\-dyn\-syms\fR]
145         [\fB\-n\fR|\fB\-\-notes\fR]
146         [\fB\-r\fR|\fB\-\-relocs\fR]
147         [\fB\-u\fR|\fB\-\-unwind\fR]
148         [\fB\-d\fR|\fB\-\-dynamic\fR]
149         [\fB\-V\fR|\fB\-\-version\-info\fR]
150         [\fB\-A\fR|\fB\-\-arch\-specific\fR]
151         [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
152         [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
153         [\fB\-p\fR <number or name>|\fB\-\-string\-dump=\fR<number or name>]
154         [\fB\-R\fR <number or name>|\fB\-\-relocated\-dump=\fR<number or name>]
155         [\fB\-c\fR|\fB\-\-archive\-index\fR]
156         [\fB\-w[lLiaprmfFsoRt]\fR|
157          \fB\-\-debug\-dump\fR[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]]
158         [\fB\-I\fR|\fB\-\-histogram\fR]
159         [\fB\-v\fR|\fB\-\-version\fR]
160         [\fB\-W\fR|\fB\-\-wide\fR]
161         [\fB\-H\fR|\fB\-\-help\fR]
162         \fIelffile\fR...
163 .SH "DESCRIPTION"
164 .IX Header "DESCRIPTION"
165 \&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
166 files.  The options control what particular information to display.
167 .PP
168 \&\fIelffile\fR... are the object files to be examined.  32\-bit and
169 64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
170 .PP
171 This program performs a similar function to \fBobjdump\fR but it
172 goes into more detail and it exists independently of the \s-1BFD\s0
173 library, so if there is a bug in \s-1BFD\s0 then readelf will not be
174 affected.
175 .SH "OPTIONS"
176 .IX Header "OPTIONS"
177 The long and short forms of options, shown here as alternatives, are
178 equivalent.  At least one option besides \fB\-v\fR or \fB\-H\fR must be
179 given.
180 .IP "\fB\-a\fR" 4
181 .IX Item "-a"
182 .PD 0
183 .IP "\fB\-\-all\fR" 4
184 .IX Item "--all"
185 .PD
186 Equivalent to specifying \fB\-\-file\-header\fR,
187 \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
188 \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
189 \&\fB\-\-version\-info\fR.
190 .IP "\fB\-h\fR" 4
191 .IX Item "-h"
192 .PD 0
193 .IP "\fB\-\-file\-header\fR" 4
194 .IX Item "--file-header"
195 .PD
196 Displays the information contained in the \s-1ELF\s0 header at the start of the
197 file.
198 .IP "\fB\-l\fR" 4
199 .IX Item "-l"
200 .PD 0
201 .IP "\fB\-\-program\-headers\fR" 4
202 .IX Item "--program-headers"
203 .IP "\fB\-\-segments\fR" 4
204 .IX Item "--segments"
205 .PD
206 Displays the information contained in the file's segment headers, if it
207 has any.
208 .IP "\fB\-S\fR" 4
209 .IX Item "-S"
210 .PD 0
211 .IP "\fB\-\-sections\fR" 4
212 .IX Item "--sections"
213 .IP "\fB\-\-section\-headers\fR" 4
214 .IX Item "--section-headers"
215 .PD
216 Displays the information contained in the file's section headers, if it
217 has any.
218 .IP "\fB\-g\fR" 4
219 .IX Item "-g"
220 .PD 0
221 .IP "\fB\-\-section\-groups\fR" 4
222 .IX Item "--section-groups"
223 .PD
224 Displays the information contained in the file's section groups, if it
225 has any.
226 .IP "\fB\-t\fR" 4
227 .IX Item "-t"
228 .PD 0
229 .IP "\fB\-\-section\-details\fR" 4
230 .IX Item "--section-details"
231 .PD
232 Displays the detailed section information. Implies \fB\-S\fR.
233 .IP "\fB\-s\fR" 4
234 .IX Item "-s"
235 .PD 0
236 .IP "\fB\-\-symbols\fR" 4
237 .IX Item "--symbols"
238 .IP "\fB\-\-syms\fR" 4
239 .IX Item "--syms"
240 .PD
241 Displays the entries in symbol table section of the file, if it has one.
242 .IP "\fB\-\-dyn\-syms\fR" 4
243 .IX Item "--dyn-syms"
244 Displays the entries in dynamic symbol table section of the file, if it
245 has one.
246 .IP "\fB\-e\fR" 4
247 .IX Item "-e"
248 .PD 0
249 .IP "\fB\-\-headers\fR" 4
250 .IX Item "--headers"
251 .PD
252 Display all the headers in the file.  Equivalent to \fB\-h \-l \-S\fR.
253 .IP "\fB\-n\fR" 4
254 .IX Item "-n"
255 .PD 0
256 .IP "\fB\-\-notes\fR" 4
257 .IX Item "--notes"
258 .PD
259 Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
260 .IP "\fB\-r\fR" 4
261 .IX Item "-r"
262 .PD 0
263 .IP "\fB\-\-relocs\fR" 4
264 .IX Item "--relocs"
265 .PD
266 Displays the contents of the file's relocation section, if it has one.
267 .IP "\fB\-u\fR" 4
268 .IX Item "-u"
269 .PD 0
270 .IP "\fB\-\-unwind\fR" 4
271 .IX Item "--unwind"
272 .PD
273 Displays the contents of the file's unwind section, if it has one.  Only
274 the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files, as well as \s-1ARM\s0 unwind tables
275 (\f(CW\*(C`.ARM.exidx\*(C'\fR / \f(CW\*(C`.ARM.extab\*(C'\fR) are currently supported.
276 .IP "\fB\-d\fR" 4
277 .IX Item "-d"
278 .PD 0
279 .IP "\fB\-\-dynamic\fR" 4
280 .IX Item "--dynamic"
281 .PD
282 Displays the contents of the file's dynamic section, if it has one.
283 .IP "\fB\-V\fR" 4
284 .IX Item "-V"
285 .PD 0
286 .IP "\fB\-\-version\-info\fR" 4
287 .IX Item "--version-info"
288 .PD
289 Displays the contents of the version sections in the file, it they
290 exist.
291 .IP "\fB\-A\fR" 4
292 .IX Item "-A"
293 .PD 0
294 .IP "\fB\-\-arch\-specific\fR" 4
295 .IX Item "--arch-specific"
296 .PD
297 Displays architecture-specific information in the file, if there
298 is any.
299 .IP "\fB\-D\fR" 4
300 .IX Item "-D"
301 .PD 0
302 .IP "\fB\-\-use\-dynamic\fR" 4
303 .IX Item "--use-dynamic"
304 .PD
305 When displaying symbols, this option makes \fBreadelf\fR use the
306 symbol hash tables in the file's dynamic section, rather than the
307 symbol table sections.
308 .IP "\fB\-x <number or name>\fR" 4
309 .IX Item "-x <number or name>"
310 .PD 0
311 .IP "\fB\-\-hex\-dump=<number or name>\fR" 4
312 .IX Item "--hex-dump=<number or name>"
313 .PD
314 Displays the contents of the indicated section as a hexadecimal bytes.
315 A number identifies a particular section by index in the section table;
316 any other string identifies all sections with that name in the object file.
317 .IP "\fB\-R <number or name>\fR" 4
318 .IX Item "-R <number or name>"
319 .PD 0
320 .IP "\fB\-\-relocated\-dump=<number or name>\fR" 4
321 .IX Item "--relocated-dump=<number or name>"
322 .PD
323 Displays the contents of the indicated section as a hexadecimal
324 bytes.  A number identifies a particular section by index in the
325 section table; any other string identifies all sections with that name
326 in the object file.  The contents of the section will be relocated
327 before they are displayed.
328 .IP "\fB\-p <number or name>\fR" 4
329 .IX Item "-p <number or name>"
330 .PD 0
331 .IP "\fB\-\-string\-dump=<number or name>\fR" 4
332 .IX Item "--string-dump=<number or name>"
333 .PD
334 Displays the contents of the indicated section as printable strings.
335 A number identifies a particular section by index in the section table;
336 any other string identifies all sections with that name in the object file.
337 .IP "\fB\-c\fR" 4
338 .IX Item "-c"
339 .PD 0
340 .IP "\fB\-\-archive\-index\fR" 4
341 .IX Item "--archive-index"
342 .PD
343 Displays the file symbol index infomation contained in the header part
344 of binary archives.  Performs the same function as the \fBt\fR
345 command to \fBar\fR, but without using the \s-1BFD\s0 library.
346 .IP "\fB\-w[lLiaprmfFsoRt]\fR" 4
347 .IX Item "-w[lLiaprmfFsoRt]"
348 .PD 0
349 .IP "\fB\-\-debug\-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]\fR" 4
350 .IX Item "--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]"
351 .PD
352 Displays the contents of the debug sections in the file, if any are
353 present.  If one of the optional letters or words follows the switch
354 then only data found in those specific sections will be dumped.
355 .Sp
356 Note that there is no single letter option to display the content of
357 trace sections or .gdb_index.
358 .Sp
359 Note: the \fB=decodedline\fR option will display the interpreted
360 contents of a .debug_line section whereas the \fB=rawline\fR option
361 dumps the contents in a raw format.
362 .Sp
363 Note: the \fB=frames\-interp\fR option will display the interpreted
364 contents of a .debug_frame section whereas the \fB=frames\fR option
365 dumps the contents in a raw format.
366 .IP "\fB\-I\fR" 4
367 .IX Item "-I"
368 .PD 0
369 .IP "\fB\-\-histogram\fR" 4
370 .IX Item "--histogram"
371 .PD
372 Display a histogram of bucket list lengths when displaying the contents
373 of the symbol tables.
374 .IP "\fB\-v\fR" 4
375 .IX Item "-v"
376 .PD 0
377 .IP "\fB\-\-version\fR" 4
378 .IX Item "--version"
379 .PD
380 Display the version number of readelf.
381 .IP "\fB\-W\fR" 4
382 .IX Item "-W"
383 .PD 0
384 .IP "\fB\-\-wide\fR" 4
385 .IX Item "--wide"
386 .PD
387 Don't break output lines to fit into 80 columns. By default
388 \&\fBreadelf\fR breaks section header and segment listing lines for
389 64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
390 \&\fBreadelf\fR to print each section header resp. each segment one a
391 single line, which is far more readable on terminals wider than 80 columns.
392 .IP "\fB\-H\fR" 4
393 .IX Item "-H"
394 .PD 0
395 .IP "\fB\-\-help\fR" 4
396 .IX Item "--help"
397 .PD
398 Display the command line options understood by \fBreadelf\fR.
399 .IP "\fB@\fR\fIfile\fR" 4
400 .IX Item "@file"
401 Read command-line options from \fIfile\fR.  The options read are
402 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
403 does not exist, or cannot be read, then the option will be treated
404 literally, and not removed.
405 .Sp
406 Options in \fIfile\fR are separated by whitespace.  A whitespace
407 character may be included in an option by surrounding the entire
408 option in either single or double quotes.  Any character (including a
409 backslash) may be included by prefixing the character to be included
410 with a backslash.  The \fIfile\fR may itself contain additional
411 @\fIfile\fR options; any such options will be processed recursively.
412 .SH "SEE ALSO"
413 .IX Header "SEE ALSO"
414 \&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
415 .SH "COPYRIGHT"
416 .IX Header "COPYRIGHT"
417 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
418 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
419 Free Software Foundation, Inc.
420 .PP
421 Permission is granted to copy, distribute and/or modify this document
422 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
423 or any later version published by the Free Software Foundation;
424 with no Invariant Sections, with no Front-Cover Texts, and with no
425 Back-Cover Texts.  A copy of the license is included in the
426 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".