Merge from vendor branch GDB:
[dragonfly.git] / contrib / binutils-2.14 / binutils / doc / readelf.1
1 .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .\"
67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
69 .    \" fudge factors for nroff and troff
70 .if n \{\
71 .    ds #H 0
72 .    ds #V .8m
73 .    ds #F .3m
74 .    ds #[ \f1
75 .    ds #] \fP
76 .\}
77 .if t \{\
78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
79 .    ds #V .6m
80 .    ds #F 0
81 .    ds #[ \&
82 .    ds #] \&
83 .\}
84 .    \" simple accents for nroff and troff
85 .if n \{\
86 .    ds ' \&
87 .    ds ` \&
88 .    ds ^ \&
89 .    ds , \&
90 .    ds ~ ~
91 .    ds /
92 .\}
93 .if t \{\
94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
100 .\}
101 .    \" troff and (daisy-wheel) nroff accents
102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
109 .ds ae a\h'-(\w'a'u*4/10)'e
110 .ds Ae A\h'-(\w'A'u*4/10)'E
111 .    \" corrections for vroff
112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
114 .    \" for low resolution devices (crt and lpr)
115 .if \n(.H>23 .if \n(.V>19 \
116 \{\
117 .    ds : e
118 .    ds 8 ss
119 .    ds o a
120 .    ds d- d\h'-1'\(ga
121 .    ds D- D\h'-1'\(hy
122 .    ds th \o'bp'
123 .    ds Th \o'LP'
124 .    ds ae ae
125 .    ds Ae AE
126 .\}
127 .rm #[ #] #H #V #F C
128 .\" ========================================================================
129 .\"
130 .IX Title "READELF 1"
131 .TH READELF 1 "2003-04-27" "binutils-2.13.90" "GNU Development Tools"
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\-e\fR|\fB\-\-headers\fR]
141         [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
142         [\fB\-n\fR|\fB\-\-notes\fR]
143         [\fB\-r\fR|\fB\-\-relocs\fR]
144         [\fB\-u\fR|\fB\-\-unwind\fR]
145         [\fB\-d\fR|\fB\-\-dynamic\fR]
146         [\fB\-V\fR|\fB\-\-version\-info\fR]
147         [\fB\-A\fR|\fB\-\-arch\-specific\fR]
148         [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
149         [\fB\-x\fR <number>|\fB\-\-hex\-dump=\fR<number>]
150         [\fB\-w[liaprmfFso]\fR|
151          \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]]
152         [\fB\-I\fR|\fB\-histogram\fR]
153         [\fB\-v\fR|\fB\-\-version\fR]
154         [\fB\-W\fR|\fB\-\-wide\fR]
155         [\fB\-H\fR|\fB\-\-help\fR]
156         \fIelffile\fR...
157 .SH "DESCRIPTION"
158 .IX Header "DESCRIPTION"
159 \&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
160 files.  The options control what particular information to display.
161 .PP
162 \&\fIelffile\fR... are the object files to be examined.  At the
163 moment, \fBreadelf\fR does not support examining archives, nor does it
164 support examining 64 bit \s-1ELF\s0 files.
165 .SH "OPTIONS"
166 .IX Header "OPTIONS"
167 The long and short forms of options, shown here as alternatives, are
168 equivalent.  At least one option besides \fB\-v\fR or \fB\-H\fR must be
169 given. 
170 .IP "\fB\-a\fR" 4
171 .IX Item "-a"
172 .PD 0
173 .IP "\fB\-\-all\fR" 4
174 .IX Item "--all"
175 .PD
176 Equivalent to specifiying \fB\-\-file\-header\fR,
177 \&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
178 \&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
179 \&\fB\-\-version\-info\fR. 
180 .IP "\fB\-h\fR" 4
181 .IX Item "-h"
182 .PD 0
183 .IP "\fB\-\-file\-header\fR" 4
184 .IX Item "--file-header"
185 .PD
186 Displays the information contained in the \s-1ELF\s0 header at the start of the
187 file.
188 .IP "\fB\-l\fR" 4
189 .IX Item "-l"
190 .PD 0
191 .IP "\fB\-\-program\-headers\fR" 4
192 .IX Item "--program-headers"
193 .IP "\fB\-\-segments\fR" 4
194 .IX Item "--segments"
195 .PD
196 Displays the information contained in the file's segment headers, if it
197 has any.
198 .IP "\fB\-S\fR" 4
199 .IX Item "-S"
200 .PD 0
201 .IP "\fB\-\-sections\fR" 4
202 .IX Item "--sections"
203 .IP "\fB\-\-section\-headers\fR" 4
204 .IX Item "--section-headers"
205 .PD
206 Displays the information contained in the file's section headers, if it
207 has any.
208 .IP "\fB\-s\fR" 4
209 .IX Item "-s"
210 .PD 0
211 .IP "\fB\-\-symbols\fR" 4
212 .IX Item "--symbols"
213 .IP "\fB\-\-syms\fR" 4
214 .IX Item "--syms"
215 .PD
216 Displays the entries in symbol table section of the file, if it has one.
217 .IP "\fB\-e\fR" 4
218 .IX Item "-e"
219 .PD 0
220 .IP "\fB\-\-headers\fR" 4
221 .IX Item "--headers"
222 .PD
223 Display all the headers in the file.  Equivalent to \fB\-h \-l \-S\fR.
224 .IP "\fB\-n\fR" 4
225 .IX Item "-n"
226 .PD 0
227 .IP "\fB\-\-notes\fR" 4
228 .IX Item "--notes"
229 .PD
230 Displays the contents of the \s-1NOTE\s0 segment, if it exists.
231 .IP "\fB\-r\fR" 4
232 .IX Item "-r"
233 .PD 0
234 .IP "\fB\-\-relocs\fR" 4
235 .IX Item "--relocs"
236 .PD
237 Displays the contents of the file's relocation section, if it has one.
238 .IP "\fB\-u\fR" 4
239 .IX Item "-u"
240 .PD 0
241 .IP "\fB\-\-unwind\fR" 4
242 .IX Item "--unwind"
243 .PD
244 Displays the contents of the file's unwind section, if it has one.  Only
245 the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
246 .IP "\fB\-u\fR" 4
247 .IX Item "-u"
248 .PD 0
249 .IP "\fB\-\-unwind\fR" 4
250 .IX Item "--unwind"
251 .PD
252 Displays the contents of the file's unwind section, if it has one.  Only
253 the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
254 .IP "\fB\-d\fR" 4
255 .IX Item "-d"
256 .PD 0
257 .IP "\fB\-\-dynamic\fR" 4
258 .IX Item "--dynamic"
259 .PD
260 Displays the contents of the file's dynamic section, if it has one.
261 .IP "\fB\-V\fR" 4
262 .IX Item "-V"
263 .PD 0
264 .IP "\fB\-\-version\-info\fR" 4
265 .IX Item "--version-info"
266 .PD
267 Displays the contents of the version sections in the file, it they
268 exist.
269 .IP "\fB\-A\fR" 4
270 .IX Item "-A"
271 .PD 0
272 .IP "\fB\-\-arch\-specific\fR" 4
273 .IX Item "--arch-specific"
274 .PD
275 Displays architecture-specific information in the file, if there
276 is any.
277 .IP "\fB\-D\fR" 4
278 .IX Item "-D"
279 .PD 0
280 .IP "\fB\-\-use\-dynamic\fR" 4
281 .IX Item "--use-dynamic"
282 .PD
283 When displaying symbols, this option makes \fBreadelf\fR use the
284 symbol table in the file's dynamic section, rather than the one in the
285 symbols section.
286 .IP "\fB\-x <number>\fR" 4
287 .IX Item "-x <number>"
288 .PD 0
289 .IP "\fB\-\-hex\-dump=<number>\fR" 4
290 .IX Item "--hex-dump=<number>"
291 .PD
292 Displays the contents of the indicated section as a hexadecimal dump.
293 .IP "\fB\-w[liaprmfFso]\fR" 4
294 .IX Item "-w[liaprmfFso]"
295 .PD 0
296 .IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames\-interp,=str,=loc]\fR" 4
297 .IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=frames-interp,=str,=loc]"
298 .PD
299 Displays the contents of the debug sections in the file, if any are
300 present.  If one of the optional letters or words follows the switch
301 then only data found in those specific sections will be dumped.
302 .IP "\fB\-I\fR" 4
303 .IX Item "-I"
304 .PD 0
305 .IP "\fB\-\-histogram\fR" 4
306 .IX Item "--histogram"
307 .PD
308 Display a histogram of bucket list lengths when displaying the contents
309 of the symbol tables.
310 .IP "\fB\-v\fR" 4
311 .IX Item "-v"
312 .PD 0
313 .IP "\fB\-\-version\fR" 4
314 .IX Item "--version"
315 .PD
316 Display the version number of readelf.
317 .IP "\fB\-W\fR" 4
318 .IX Item "-W"
319 .PD 0
320 .IP "\fB\-\-wide\fR" 4
321 .IX Item "--wide"
322 .PD
323 Don't break output lines to fit into 80 columns. By default
324 \&\fBreadelf\fR breaks section header and segment listing lines for
325 64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
326 \&\fBreadelf\fR to print each section header resp. each segment one a
327 single line, which is far more readable on terminals wider than 80 columns.
328 .IP "\fB\-H\fR" 4
329 .IX Item "-H"
330 .PD 0
331 .IP "\fB\-\-help\fR" 4
332 .IX Item "--help"
333 .PD
334 Display the command line options understood by \fBreadelf\fR.
335 .SH "SEE ALSO"
336 .IX Header "SEE ALSO"
337 \&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
338 .SH "COPYRIGHT"
339 .IX Header "COPYRIGHT"
340 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
341 2001, 2002, 2003 Free Software Foundation, Inc.
342 .PP
343 Permission is granted to copy, distribute and/or modify this document
344 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
345 or any later version published by the Free Software Foundation;
346 with no Invariant Sections, with no Front-Cover Texts, and with no
347 Back-Cover Texts.  A copy of the license is included in the
348 section entitled ``\s-1GNU\s0 Free Documentation License''.