]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/elftoolchain/elfdump/elfdump.1
amd64: use register macros for gdb_cpu_getreg()
[FreeBSD/FreeBSD.git] / contrib / elftoolchain / elfdump / elfdump.1
1 .\" Copyright (c) 2003 David O'Brien
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/usr.bin/elfdump/elfdump.1,v 1.6 2005/01/18 13:43:48 ru Exp $
26 .\" $Id: elfdump.1 3231 2015-07-30 13:47:56Z emaste $
27 .\"
28 .Dd August 25, 2011
29 .Dt ELFDUMP 1
30 .Os
31 .Sh NAME
32 .Nm elfdump
33 .Nd "display information about"
34 .Tn ELF
35 files
36 .Sh SYNOPSIS
37 .Nm
38 .Fl a | cdeGhiknprsv
39 .Op Fl S
40 .Op Fl V
41 .Op Fl N Ar name
42 .Op Fl w Ar file
43 .Ar file ...
44 .Sh DESCRIPTION
45 The
46 .Nm
47 utility
48 dumps various information about the specified
49 .Tn ELF
50 .Ar file .
51 .Pp
52 The options are as follows:
53 .Bl -tag -width ".Fl w Ar file"
54 .It Fl a
55 Dump all information.
56 .It Fl c
57 Dump section headers.
58 .It Fl d
59 Dump dynamic symbols.
60 .It Fl e
61 Dump ELF header.
62 .It Fl G
63 Dump the GOT.
64 .It Fl h
65 Dump the hash values.
66 .It Fl i
67 Dump the dynamic interpreter.
68 .It Fl k
69 Dump the ELF checksum.
70 .It Fl n
71 Dump note sections.
72 .It Fl N Ar name
73 Only dump the section with the specific
74 .Ar name .
75 Archive symbol table can be specified with
76 the special section name ARSYM.
77 More than one
78 .Fl N
79 option may appear.
80 .It Fl p
81 Dump the program header.
82 .It Fl r
83 Dump relocations.
84 .It Fl s
85 Dump the symbol table.
86 .It Fl S
87 Output in the Solaris
88 .Nm
89 format.
90 .It Fl v
91 Dump the symbol-versioning sections.
92 .It Fl V
93 Print a version identifier and exit.
94 .It Fl w Ar file
95 Write output to a
96 .Ar file
97 instead of the standard output.
98 .El
99 .Sh EXIT STATUS
100 .Ex -std
101 .Sh EXAMPLES
102 The following is an example of a typical usage
103 of the
104 .Nm
105 command:
106 .Pp
107 .Dl "elfdump -a -w output /bin/ls"
108 .Pp
109 To dump the content of '.dynsym' symbol table:
110 .Pp
111 .Dl "elfdump -s -N .dynsym /bin/ls"
112 .Pp
113 To dump the archive symbol table,
114 but not the symbol tables of archive members:
115 .Pp
116 .Dl "elfdump -s -N ARSYM /usr/lib/libelf.a"
117 .Pp
118 To dump the content of .got section and
119 the symbol-versioning sections in Solaris
120 .Nm
121 format:
122 .Pp
123 .Dl "elfdump -S -Gv /bin/ls"
124 .Sh SEE ALSO
125 .Xr objdump 1 ,
126 .Xr readelf 1 ,
127 .Xr elf 3
128 .Rs
129 .%A "AT&T Unix Systems Labs"
130 .%T "System V Application Binary Interface"
131 .%O http://www.sco.com/developers/gabi/
132 .Re
133 .Sh HISTORY
134 The
135 .Nm
136 utility first appeared in
137 .Fx 5.0 .
138 .Sh AUTHORS
139 .An -nosplit
140 The
141 .Nm
142 utility
143 was written by
144 .An Jake Burkholder Aq Mt jake@FreeBSD.org .
145 Later it was rewritten based on the
146 libelf library.
147 This
148 manual page was written by
149 .An David O'Brien Aq Mt obrien@FreeBSD.org .
150 .Pp
151 .An Kai Wang Aq Mt kaiw@FreeBSD.org
152 rewrote it using the
153 .Lb libelf
154 and implemented additional functionality.
155 .Sh BUGS
156 Does not fully implement the
157 .Tn ELF
158 gABI.