old-cross-binutils/binutils/objdump.1
2001-03-25 20:32:31 +00:00

580 lines
18 KiB
Groff

.rn '' }`
''' $RCSfile$$Revision$$Date$
'''
''' $Log$
''' Revision 1.5 2001/03/25 20:32:25 nickc
''' Automate generate on man pages
'''
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R
.fi
..
'''
'''
''' Set up \*(-- to give an unbreakable dash;
''' string Tr holds user defined translation string.
''' Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.ie n \{\
.ds -- \(*W-
.ds PI pi
.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
.ds L" ""
.ds R" ""
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
''' \*(L" and \*(R", except that they are used on ".xx" lines,
''' such as .IP and .SH, which do another additional levels of
''' double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\" If the F register is turned on, we'll generate
.\" index entries out stderr for the following things:
.\" TH Title
.\" SH Header
.\" Sh Subsection
.\" Ip Item
.\" X<> Xref (embedded
.\" Of course, you have to process the output yourself
.\" in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH OBJDUMP.1 1 "binutils-2.11.90" "23/Mar/101" "GNU"
.UC
.if n .hy 0
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
. \" AM - accent mark definitions
.bd B 3
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds ? ?
. ds ! !
. ds /
. ds q
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds v \h'-1'\o'\(aa\(ga'
. ds _ \h'-1'^
. ds . \h'-1'.
. ds 3 3
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
. ds oe oe
. ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
objdump \- display information from object files.
.SH "SYNOPSIS"
objdump [ \-a | --archive-headers ]
[ \-b \fIbfdname\fR | --target=\fIbfdname\fR ]
[ \-C | --demangle[=\fIstyle\fR] ]
[ \-d | --disassemble ]
[ \-D | --disassemble-all ]
[ \-z | --disassemble-zeroes ]
[ \-EB | \-EL | --endian={big | little } ]
[ \-f | --file-headers ]
[ --file-start-context ]
[ \-g | --debugging ]
[ \-h | --section-headers | --headers ]
[ \-i | --info ]
[ \-j \fIsection\fR | --section=\fIsection\fR ]
[ \-l | --line-numbers ]
[ \-S | --source ]
[ \-m \fImachine\fR | --architecture=\fImachine\fR ]
[ \-M \fIoptions\fR | --disassembler-options=\fIoptions\fR]
[ \-p | --private-headers ]
[ \-r | --reloc ]
[ \-R | --dynamic-reloc ]
[ \-s | --full-contents ]
[ \-G | --stabs ]
[ \-t | --syms ]
[ \-T | --dynamic-syms ]
[ \-x | --all-headers ]
[ \-w | --wide ]
[ --start-address=\fIaddress\fR ]
[ --stop-address=\fIaddress\fR ]
[ --prefix-addresses]
[ --[no-]show-raw-insn ]
[ --adjust-vma=\fIoffset\fR ]
[ \-V | --version ]
[ \-H | --help ]
\fIobjfile\fR...
.SH "DESCRIPTION"
\f(CWobjdump\fR displays information about one or more object files.
The options control what particular information to display. This
information is mostly useful to programmers who are working on the
compilation tools, as opposed to programmers who just want their
program to compile and work.
.PP
\fIobjfile\fR... are the object files to be examined. When you
specify archives, \f(CWobjdump\fR shows information on each of the member
object files.
.SH "OPTIONS"
The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
\fB\-a,\-d,\-D,\-f,\-g,\-G,\-h,\-H,\-p,\-r,\-R,\-S,\-t,\-T,\-V,\-x\fR must be given.
.Ip "\f(CW-a\fR" 4
.Ip "\f(CW--archive-header\fR" 4
If any of the \fIobjfile\fR files are archives, display the archive
header information (in a format similar to \fBls \-l\fR). Besides the
information you could list with \fBar tv\fR, \fBobjdump \-a\fR shows
the object file format of each archive member.
.Ip "\f(CW--adjust-vma=\fIoffset\fR\fR" 4
When dumping information, first add \fIoffset\fR to all the section
addresses. This is useful if the section addresses do not correspond to
the symbol table, which can happen when putting sections at particular
addresses when using a format which can not represent section addresses,
such as a.out.
.Ip "\f(CW-b \fIbfdname\fR\fR" 4
.Ip "\f(CW--target=\fIbfdname\fR\fR" 4
Specify that the object-code format for the object files is
\fIbfdname\fR. This option may not be necessary; \fIobjdump\fR can
automatically recognize many formats.
.Sp
For example,
objdump \-b oasys \-m vax \-h fu.o
.Sp
displays summary information from the section headers (\fB\-h\fR) of
\fIfu.o\fR, which is explicitly identified (\fB\-m\fR) as a \s-1VAX\s0 object
file in the format produced by Oasys compilers. You can list the
formats available with the \fB\-i\fR option.
.Ip "\f(CW-C\fR" 4
.Ip "\f(CW--demangle[=\fIstyle\fR]\fR" 4
Decode (\fIdemangle\fR) low-level symbol names into user-level names.
Besides removing any initial underscore prepended by the system, this
makes \*(C+ function names readable. Different compilers have different
mangling styles. The optional demangling style argument can be used to
choose an appropriate demangling style for your compiler.
.Ip "\f(CW-G\fR" 4
.Ip "\f(CW--debugging\fR" 4
Display debugging information. This attempts to parse debugging
information stored in the file and print it out using a C like syntax.
Only certain types of debugging information have been implemented.
.Ip "\f(CW-d\fR" 4
.Ip "\f(CW--disassemble\fR" 4
Display the assembler mnemonics for the machine instructions from
\fIobjfile\fR. This option only disassembles those sections which are
expected to contain instructions.
.Ip "\f(CW-D\fR" 4
.Ip "\f(CW--disassemble-all\fR" 4
Like \fB\-d\fR, but disassemble the contents of all sections, not just
those expected to contain instructions.
.Ip "\f(CW--prefix-addresses\fR" 4
When disassembling, print the complete address on each line. This is
the older disassembly format.
.Ip "\f(CW--disassemble-zeroes\fR" 4
Normally the disassembly output will skip blocks of zeroes. This
option directs the disassembler to disassemble those blocks, just like
any other data.
.Ip "\f(CW-EB\fR" 4
.Ip "\f(CW-EL\fR" 4
.Ip "\f(CW--endian={big|little}\fR" 4
Specify the endianness of the object files. This only affects
disassembly. This can be useful when disassembling a file format which
does not describe endianness information, such as S\-records.
.Ip "\f(CW-f\fR" 4
.Ip "\f(CW--file-header\fR" 4
Display summary information from the overall header of
each of the \fIobjfile\fR files.
.Ip "\f(CW--file-start-context\fR" 4
Specify that when displaying interlisted source code/disassembly
(assumes \*(L'\-S') from a file that has not yet been displayed, extend the
context to the start of the file.
.Ip "\f(CW-h\fR" 4
.Ip "\f(CW--section-header\fR" 4
.Ip "\f(CW--header\fR" 4
Display summary information from the section headers of the
object file.
.Sp
File segments may be relocated to nonstandard addresses, for example by
using the \fB\-Ttext\fR, \fB\-Tdata\fR, or \fB\-Tbss\fR options to
\f(CWld\fR. However, some object file formats, such as a.out, do not
store the starting address of the file segments. In those situations,
although \f(CWld\fR relocates the sections correctly, using \fBobjdump
\-h\fR to list the file section headers cannot show the correct addresses.
Instead, it shows the usual addresses, which are implicit for the
target.
.Ip "\f(CW--help\fR" 4
Print a summary of the options to \f(CWobjdump\fR and exit.
.Ip "\f(CW-i\fR" 4
.Ip "\f(CW--info\fR" 4
Display a list showing all architectures and object formats available
for specification with \fB\-b\fR or \fB\-m\fR.
.Ip "\f(CW-j \fIname\fR\fR" 4
.Ip "\f(CW--section=\fIname\fR\fR" 4
Display information only for section \fIname\fR.
.Ip "\f(CW-l\fR" 4
.Ip "\f(CW--line-numbers\fR" 4
Label the display (using debugging information) with the filename and
source line numbers corresponding to the object code or relocs shown.
Only useful with \fB\-d\fR, \fB\-D\fR, or \fB\-r\fR.
.Ip "\f(CW-m \fImachine\fR\fR" 4
.Ip "\f(CW--architecture=\fImachine\fR\fR" 4
Specify the architecture to use when disassembling object files. This
can be useful when disassembling object files which do not describe
architecture information, such as S\-records. You can list the available
architectures with the \fB\-i\fR option.
.Ip "\f(CW-M \fIoptions\fR\fR" 4
.Ip "\f(CW--disassembler-options=\fIoptions\fR\fR" 4
Pass target specific information to the disassembler. Only supported on
some targets.
.Sp
If the target is an \s-1ARM\s0 architecture then this switch can be used to
select which register name set is used during disassembler. Specifying
\fB\-M reg-name-std\fR (the default) will select the register names as
used in \s-1ARM\s0's instruction set documentation, but with register 13 called
\&'sp\*(R', register 14 called \*(L'lr\*(R' and register 15 called \*(L'pc\*(R'. Specifying
\fB\-M reg-names-apcs\fR will select the name set used by the \s-1ARM\s0
Procedure Call Standard, whilst specifying \fB\-M reg-names-raw\fR will
just use \fBr\fR followed by the register number.
.Sp
There are also two variants on the \s-1APCS\s0 register naming scheme enabled
by \fB\-M reg-names-atpcs\fR and \fB\-M reg-names-special-atpcs\fR which
use the \s-1ARM/\s0Thumb Procedure Call Standard naming conventions. (Eiuther
with the normal register name sor the special register names).
.Sp
This option can also be used for \s-1ARM\s0 architectures to force the
disassembler to interpret all instructions as \s-1THUMB\s0 instructions by
using the switch \fB--disassembler-options=force-thumb\fR. This can be
useful when attempting to disassemble thumb code produced by other
compilers.
.Ip "\f(CW-p\fR" 4
.Ip "\f(CW--private-headers\fR" 4
Print information that is specific to the object file format. The exact
information printed depends upon the object file format. For some
object file formats, no additional information is printed.
.Ip "\f(CW-r\fR" 4
.Ip "\f(CW--reloc\fR" 4
Print the relocation entries of the file. If used with \fB\-d\fR or
\fB\-D\fR, the relocations are printed interspersed with the
disassembly.
.Ip "\f(CW-R\fR" 4
.Ip "\f(CW--dynamic-reloc\fR" 4
Print the dynamic relocation entries of the file. This is only
meaningful for dynamic objects, such as certain types of shared
libraries.
.Ip "\f(CW-s\fR" 4
.Ip "\f(CW--full-contents\fR" 4
Display the full contents of any sections requested.
.Ip "\f(CW-S\fR" 4
.Ip "\f(CW--source\fR" 4
Display source code intermixed with disassembly, if possible. Implies
\fB\-d\fR.
.Ip "\f(CW--show-raw-insn\fR" 4
When disassembling instructions, print the instruction in hex as well as
in symbolic form. This is the default except when
\f(CW--prefix-addresses\fR is used.
.Ip "\f(CW--no-show-raw-insn\fR" 4
When disassembling instructions, do not print the instruction bytes.
This is the default when \f(CW--prefix-addresses\fR is used.
.Ip "\f(CW-G\fR" 4
.Ip "\f(CW--stabs\fR" 4
Display the full contents of any sections requested. Display the
contents of the .stab and .stab.index and .stab.excl sections from an
\s-1ELF\s0 file. This is only useful on systems (such as Solaris 2.0) in which
\&\f(CW.stab\fR debugging symbol-table entries are carried in an \s-1ELF\s0
section. In most other file formats, debugging symbol-table entries are
interleaved with linkage symbols, and are visible in the \fB--syms\fR
output.
.Ip "\f(CW--start-address=\fIaddress\fR\fR" 4
Start displaying data at the specified address. This affects the output
of the \f(CW-d\fR, \f(CW-r\fR and \f(CW-s\fR options.
.Ip "\f(CW--stop-address=\fIaddress\fR\fR" 4
Stop displaying data at the specified address. This affects the output
of the \f(CW-d\fR, \f(CW-r\fR and \f(CW-s\fR options.
.Ip "\f(CW-t\fR" 4
.Ip "\f(CW--syms\fR" 4
Print the symbol table entries of the file.
This is similar to the information provided by the \fBnm\fR program.
.Ip "\f(CW-T\fR" 4
.Ip "\f(CW--dynamic-syms\fR" 4
Print the dynamic symbol table entries of the file. This is only
meaningful for dynamic objects, such as certain types of shared
libraries. This is similar to the information provided by the \fBnm\fR
program when given the \fB\-D\fR (\fB--dynamic\fR) option.
.Ip "\f(CW--version\fR" 4
Print the version number of \f(CWobjdump\fR and exit.
.Ip "\f(CW-x\fR" 4
.Ip "\f(CW--all-header\fR" 4
Display all available header information, including the symbol table and
relocation entries. Using \fB\-x\fR is equivalent to specifying all of
\fB\-a \-f \-h \-r \-t\fR.
.Ip "\f(CW-w\fR" 4
.Ip "\f(CW--wide\fR" 4
Format some lines for output devices that have more than 80 columns.
.SH "SEE ALSO"
\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled \*(L"GNU Free Documentation License\*(R".
.rn }` ''
.IX Title "OBJDUMP.1 1"
.IX Name "objdump - display information from object files."
.IX Header "NAME"
.IX Header "SYNOPSIS"
.IX Header "DESCRIPTION"
.IX Header "OPTIONS"
.IX Item "\f(CW-a\fR"
.IX Item "\f(CW--archive-header\fR"
.IX Item "\f(CW--adjust-vma=\fIoffset\fR\fR"
.IX Item "\f(CW-b \fIbfdname\fR\fR"
.IX Item "\f(CW--target=\fIbfdname\fR\fR"
.IX Item "\f(CW-C\fR"
.IX Item "\f(CW--demangle[=\fIstyle\fR]\fR"
.IX Item "\f(CW-G\fR"
.IX Item "\f(CW--debugging\fR"
.IX Item "\f(CW-d\fR"
.IX Item "\f(CW--disassemble\fR"
.IX Item "\f(CW-D\fR"
.IX Item "\f(CW--disassemble-all\fR"
.IX Item "\f(CW--prefix-addresses\fR"
.IX Item "\f(CW--disassemble-zeroes\fR"
.IX Item "\f(CW-EB\fR"
.IX Item "\f(CW-EL\fR"
.IX Item "\f(CW--endian={big|little}\fR"
.IX Item "\f(CW-f\fR"
.IX Item "\f(CW--file-header\fR"
.IX Item "\f(CW--file-start-context\fR"
.IX Item "\f(CW-h\fR"
.IX Item "\f(CW--section-header\fR"
.IX Item "\f(CW--header\fR"
.IX Item "\f(CW--help\fR"
.IX Item "\f(CW-i\fR"
.IX Item "\f(CW--info\fR"
.IX Item "\f(CW-j \fIname\fR\fR"
.IX Item "\f(CW--section=\fIname\fR\fR"
.IX Item "\f(CW-l\fR"
.IX Item "\f(CW--line-numbers\fR"
.IX Item "\f(CW-m \fImachine\fR\fR"
.IX Item "\f(CW--architecture=\fImachine\fR\fR"
.IX Item "\f(CW-M \fIoptions\fR\fR"
.IX Item "\f(CW--disassembler-options=\fIoptions\fR\fR"
.IX Item "\f(CW-p\fR"
.IX Item "\f(CW--private-headers\fR"
.IX Item "\f(CW-r\fR"
.IX Item "\f(CW--reloc\fR"
.IX Item "\f(CW-R\fR"
.IX Item "\f(CW--dynamic-reloc\fR"
.IX Item "\f(CW-s\fR"
.IX Item "\f(CW--full-contents\fR"
.IX Item "\f(CW-S\fR"
.IX Item "\f(CW--source\fR"
.IX Item "\f(CW--show-raw-insn\fR"
.IX Item "\f(CW--no-show-raw-insn\fR"
.IX Item "\f(CW-G\fR"
.IX Item "\f(CW--stabs\fR"
.IX Item "\f(CW--start-address=\fIaddress\fR\fR"
.IX Item "\f(CW--stop-address=\fIaddress\fR\fR"
.IX Item "\f(CW-t\fR"
.IX Item "\f(CW--syms\fR"
.IX Item "\f(CW-T\fR"
.IX Item "\f(CW--dynamic-syms\fR"
.IX Item "\f(CW--version\fR"
.IX Item "\f(CW-x\fR"
.IX Item "\f(CW--all-header\fR"
.IX Item "\f(CW-w\fR"
.IX Item "\f(CW--wide\fR"
.IX Header "SEE ALSO"
.IX Header "COPYRIGHT"