1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
'\" te
.\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2019 Joyent, Inc.
.\" 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.
.\" 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.
.\" 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]
.TH DUMP 1 "Dec 19, 2018"
.SH NAME
dump \- dump selected parts of an object file
.SH SYNOPSIS
.LP
.nf
\fBdump\fR [\fB-aCcfghLorstV\fR [\fB-p\fR]] [\fB-T\fR \fIindex\fR [\fI,\fR \fIindexn\fR]] \fIfilename\fR...
.fi
.LP
.nf
\fBdump\fR [\fB-afhorstL\fR [\fB-p\fR] [v]] \fIfilename\fR...
.fi
.LP
.nf
\fBdump\fR [\fB-hsr\fR [\fB-p\fR] [\fB-d\fR \fInumber\fR [\fI,\fR \fInumbern\fR]]] \fIfilename\fR...
.fi
.LP
.nf
\fBdump\fR [\fB-hsrt\fR [\fB-p\fR] [\fB-n\fR \fIname\fR]] \fIfilename\fR...
.fi
.SH DESCRIPTION
.LP
The \fBdump\fR utility dumps selected parts of each of its object \fIfile\fR
arguments.
.sp
.LP
The \fBdump\fR utility is best suited for use in shell scripts, whereas the
\fBelfdump\fR(1) command is recommended for more human-readable output.
.SH OPTIONS
.LP
This utility will accept both object files and archives of object files. It
processes each file argument according to one or more of the following options:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 20n
Dumps the archive header of each member of an archive.
.RE
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 20n
Dumps the string table(s).
.RE
.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.RS 20n
Dumps decoded symbol table names.
.RE
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 20n
Dumps each file header.
.RE
.sp
.ne 2
.na
\fB\fB-g\fR\fR
.ad
.RS 20n
Dumps the global symbols in the symbol table of an archive.
.RE
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 20n
Dumps the section headers.
.RE
.sp
.ne 2
.na
\fB\fB-L\fR\fR
.ad
.RS 20n
Dumps dynamic linking information and static shared library information, if
available.
.RE
.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 20n
Dumps each program execution header.
.RE
.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 20n
Dumps relocation information.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 20n
Dumps section contents in hexadecimal.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 20n
Dumps symbol table entries.
.RE
.sp
.ne 2
.na
\fB\fB-T\fR \fIindex\fR\fR
.ad
.br
.na
\fB\fB-T\fR \fIindex1\fR,\fIindex2\fR\fR
.ad
.RS 20n
Dumps only the indexed symbol table entry defined by \fIindex\fR or a range of
entries defined by \fIindex1\fR\fB,\fR\fIindex2\fR.
.RE
.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.RS 20n
Prints version information.
.RE
.sp
.LP
The following modifiers are used in conjunction with the options listed above
to modify their capabilities.
.sp
.ne 2
.na
\fB\fB-d\fR \fInumber\fR\fR
.ad
.br
.na
\fB\fB-d\fR \fInumber1\fR,\fInumber2\fR\fR
.ad
.RS 22n
Dumps the section number indicated by \fInumber\fR or the range of sections
starting at \fInumber1\fR and ending at \fInumber2\fR. This modifier can be
used with \fB-h\fR, \fB-s\fR, and \fB-r\fR. When \fB-d\fR is used with \fB-h\fR
or \fB-s\fR, the argument is treated as the number of a section or range of
sections. When \fB-d\fR is used with \fB-r\fR, the argument is treated as the
number of the section or range of sections to which the relocation applies. For
example, to print out all relocation entries associated with the \fB\&.text\fR
section, specify the number of the section as the argument to \fB-d\fR. If
\fB\&.text\fR is section number 2 in the file, \fBdump\fR \fB-r\fR \fB-d\fR
\fB2\fR will print all associated entries. To print out a specific relocation
section, use \fBdump \fR\fB-s\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for raw data
output, or \fBdump \fR\fB-sv\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for interpreted
output.
.RE
.sp
.ne 2
.na
\fB\fB\fR\fB-n\fR\fB \fR\fIname\fR\fR
.ad
.RS 22n
Dumps information pertaining only to the named entity. This modifier can be
used with \fB-h\fR, \fB-s\fR, \fB-r\fR, and \fB-t\fR. When \fB-n\fR is used
with \fB-h\fR or \fB-s\fR, the argument will be treated as the name of a
section. When \fB-n\fR is used with \fB-t\fR or \fB-r\fR, the argument will be
treated as the name of a symbol. For example, \fBdump\fR \fB-t\fR \fB-n\fR
\fB\&.text\fR will dump the symbol table entry associated with the symbol whose
name is \fB\&.text\fR, where \fBdump\fR \fB-h\fR \fB-n\fR \fB .text\fR will
dump the section header information for the \fB\&.text\fR section.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 22n
Suppresses printing of the headings.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 22n
Dumps information in symbolic representation rather than numeric. This modifier
can be used with
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
(date, user id, group id)
.RE
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
(class, data, type, machine, version, flags)
.RE
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 6n
(type, flags)
.RE
.sp
.ne 2
.na
\fB\fB-L\fR\fR
.ad
.RS 6n
(value)
.RE
.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 6n
(type, flags)
.RE
.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 6n
(name, type)
.RE
.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 6n
(interpret section contents wherever possible)
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 6n
(type, bind)
.RE
When \fB-v\fR is used with \fB-s\fR, all sections that can be interpreted, such
as the string table or symbol table, will be interpreted. For example,
\fBdump\fR \fB-sv\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will produce the
same formatted output as \fBdump\fR \fB-tv\fR \fIfilename\fR.\|.\|.\|, but
\fBdump\fR \fB-s\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will print raw
data in hexadecimal. Without additional modifiers, \fBdump\fR \fB-sv\fR
\fIfilename\fR... will dump all sections in the files, interpreting all those
that it can and dumping the rest (such as \fB\&.text\fR or \fB\&.data\fR) as
raw data.
.RE
.sp
.LP
The \fBdump\fR utility attempts to format the information it dumps in a
meaningful way, printing certain information in character, hexadecimal, octal,
or decimal representation as appropriate.
.SH SEE ALSO
.LP
\fBelfdump\fR(1), \fBnm\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4),
\fBattributes\fR(5)
|