Merge commit '008b34be09d7b9c3e7a18d3ce9ef8b5c4f4ff8b8'
[unleashed.git] / share / man / man1 / dump.1
blob50540b462dfb2c43932de50ea2b1934c5de60edc
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DUMP 1 "Sep 6, 2002"
7 .SH NAME
8 dump \- dump selected parts of an object file
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBdump\fR [\fB-aCcfghLorstV\fR [\fB-p\fR]] [\fB-T\fR \fIindex\fR [\fI,\fR \fIindexn\fR]] \fIfilename\fR...
13 .fi
15 .LP
16 .nf
17 \fBdump\fR [\fB-afhorstL\fR [\fB-p\fR] [v]] \fIfilename\fR...
18 .fi
20 .LP
21 .nf
22 \fBdump\fR [\fB-hsr\fR [\fB-p\fR] [\fB-d\fR \fInumber\fR [\fI,\fR \fInumbern\fR]]] \fIfilename\fR...
23 .fi
25 .LP
26 .nf
27 \fBdump\fR [\fB-hsrt\fR [\fB-p\fR] [\fB-n\fR \fIname\fR]] \fIfilename\fR...
28 .fi
30 .SH DESCRIPTION
31 .sp
32 .LP
33 The \fBdump\fR utility dumps selected parts of each of its object \fIfile\fR
34 arguments.
35 .sp
36 .LP
37 The \fBdump\fR utility is best suited for use in shell scripts, whereas the
38 \fBelfdump\fR(1) command is recommended for more human-readable output.
39 .SH OPTIONS
40 .sp
41 .LP
42 This utility will accept both object files and archives of object files. It
43 processes each file argument according to one or more of the following options:
44 .sp
45 .ne 2
46 .na
47 \fB\fB-a\fR\fR
48 .ad
49 .RS 20n
50 Dumps the archive header of each member of an archive.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fB-c\fR\fR
57 .ad
58 .RS 20n
59 Dumps the string table(s).
60 .RE
62 .sp
63 .ne 2
64 .na
65 \fB\fB-C\fR\fR
66 .ad
67 .RS 20n
68 Dumps decoded C++ symbol table names.
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fB-f\fR\fR
75 .ad
76 .RS 20n
77 Dumps each file header.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-g\fR\fR
84 .ad
85 .RS 20n
86 Dumps the global symbols in the symbol table of an archive.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fB-h\fR\fR
93 .ad
94 .RS 20n
95 Dumps the section headers.
96 .RE
98 .sp
99 .ne 2
101 \fB\fB-L\fR\fR
103 .RS 20n
104 Dumps dynamic linking information and static shared library information, if
105 available.
109 .ne 2
111 \fB\fB-o\fR\fR
113 .RS 20n
114 Dumps each program execution header.
118 .ne 2
120 \fB\fB-r\fR\fR
122 .RS 20n
123 Dumps relocation information.
127 .ne 2
129 \fB\fB-s\fR\fR
131 .RS 20n
132 Dumps section contents in hexadecimal.
136 .ne 2
138 \fB\fB-t\fR\fR
140 .RS 20n
141 Dumps symbol table entries.
145 .ne 2
147 \fB\fB-T\fR \fIindex\fR\fR
151 \fB\fB-T\fR \fIindex1\fR,\fIindex2\fR\fR
153 .RS 20n
154 Dumps only the indexed symbol table entry defined by \fIindex\fR or a range of
155 entries defined by \fIindex1\fR\fB,\fR\fIindex2\fR.
159 .ne 2
161 \fB\fB-V\fR\fR
163 .RS 20n
164 Prints version information.
169 The following modifiers are used in conjunction with the options listed above
170 to modify their capabilities.
172 .ne 2
174 \fB\fB-d\fR \fInumber\fR\fR
178 \fB\fB-d\fR \fInumber1\fR,\fInumber2\fR\fR
180 .RS 22n
181 Dumps the section number indicated by \fInumber\fR or the range of sections
182 starting at \fInumber1\fR and ending at \fInumber2\fR. This modifier can be
183 used with \fB-h\fR, \fB-s\fR, and \fB-r\fR. When \fB-d\fR is used with \fB-h\fR
184 or \fB-s\fR, the argument is treated as the number of a section or range of
185 sections. When \fB-d\fR is used with \fB-r\fR, the argument is treated as the
186 number of the section or range of sections to which the relocation applies. For
187 example, to print out all relocation entries associated with the \fB\&.text\fR
188 section, specify the number of the section as the argument to \fB-d\fR. If
189 \fB\&.text\fR is section number 2 in the file, \fBdump\fR \fB-r\fR \fB-d\fR
190 \fB2\fR will print all associated entries. To print out a specific relocation
191 section, use \fBdump \fR\fB-s\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for raw data
192 output, or \fBdump \fR\fB-sv\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for interpreted
193 output.
197 .ne 2
199 \fB\fB\fR\fB-n\fR\fB \fR\fIname\fR\fR
201 .RS 22n
202 Dumps information pertaining only to the named entity. This modifier can be
203 used with \fB-h\fR, \fB-s\fR, \fB-r\fR, and  \fB-t\fR. When \fB-n\fR is used
204 with \fB-h\fR or \fB-s\fR, the argument will be treated as the name of a
205 section. When \fB-n\fR is used with \fB-t\fR or \fB-r\fR, the argument will be
206 treated as the name of a symbol. For example, \fBdump\fR \fB-t\fR \fB-n\fR
207 \fB\&.text\fR will dump the symbol table entry associated with the symbol whose
208 name is \fB\&.text\fR, where \fBdump\fR \fB-h\fR \fB-n\fR \fB .text\fR will
209 dump the section header information for the \fB\&.text\fR section.
213 .ne 2
215 \fB\fB-p\fR\fR
217 .RS 22n
218 Suppresses printing of the headings.
222 .ne 2
224 \fB\fB-v\fR\fR
226 .RS 22n
227 Dumps information in symbolic representation rather than numeric. This modifier
228 can be used with
230 .ne 2
232 \fB\fB-a\fR\fR
234 .RS 6n
235 (date, user id, group id)
239 .ne 2
241 \fB\fB-f\fR\fR
243 .RS 6n
244 (class, data, type, machine, version, flags)
248 .ne 2
250 \fB\fB-h\fR\fR
252 .RS 6n
253 (type, flags)
257 .ne 2
259 \fB\fB-L\fR\fR
261 .RS 6n
262 (value)
266 .ne 2
268 \fB\fB-o\fR\fR
270 .RS 6n
271 (type, flags)
275 .ne 2
277 \fB\fB-r\fR\fR
279 .RS 6n
280 (name, type)
284 .ne 2
286 \fB\fB-s\fR\fR
288 .RS 6n
289 (interpret section contents wherever possible)
293 .ne 2
295 \fB\fB-t\fR\fR
297 .RS 6n
298 (type, bind)
301 When \fB-v\fR is used with \fB-s\fR, all sections that can be interpreted, such
302 as the string table or symbol table, will be interpreted. For example,
303 \fBdump\fR \fB-sv\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will produce the
304 same formatted output as \fBdump\fR \fB-tv\fR \fIfilename\fR.\|.\|.\|, but
305 \fBdump\fR \fB-s\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will print raw
306 data in hexadecimal. Without additional modifiers, \fBdump\fR \fB-sv\fR
307 \fIfilename\fR... will dump all sections in the files, interpreting all those
308 that it can and dumping the rest (such as \fB\&.text\fR or \fB\&.data\fR) as
309 raw data.
314 The \fBdump\fR utility attempts to format the information it dumps in a
315 meaningful way, printing certain information in character, hexadecimal, octal,
316 or decimal representation as appropriate.
317 .SH SEE ALSO
320 \fBelfdump\fR(1), \fBnm\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4),
321 \fBattributes\fR(5)