'\" te .\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .\" 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 "Sep 6, 2002" .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 .sp .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 .sp .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 C++ 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 .sp .LP \fBelfdump\fR(1), \fBnm\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4), \fBattributes\fR(5)