old-cross-binutils/binutils/objdump.1

459 lines
18 KiB
Groff

.\" Automatically generated by Pod::Man version 1.02
.\" Wed May 30 12:24:28 2001
.\"
.\" Standard preamble:
.\" ======================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.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" ""
. ds C` `
. ds C' '
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
.\" index entries marked with X<> in POD. Of course, you'll have to process
.\" the output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
. .
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it
.\" makes way too many mistakes in technical documents.
.hy 0
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
.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 /
.\}
.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 / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" 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 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
. \" 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 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
.\}
.rm #[ #] #H #V #F C
.\" ======================================================================
.\"
.IX Title "OBJDUMP.1 1"
.TH OBJDUMP.1 1 "binutils-2.11.90" "2001-05-30" "GNU"
.UC
.SH "NAME"
objdump \- display information from object files.
.SH "SYNOPSIS"
.IX Header "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"
.IX Header "DESCRIPTION"
\&\f(CW\*(C`objdump\*(C'\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(CW\*(C`objdump\*(C'\fR shows information on each of the member
object files.
.SH "OPTIONS"
.IX Header "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\*(C`\-a\*(C'\fR" 4
.IX Item "-a"
.Ip "\f(CW\*(C`\-\-archive\-header\*(C'\fR" 4
.IX Item "--archive-header"
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\*(C`\-\-adjust\-vma=\f(CIoffset\f(CW\*(C'\fR" 4
.IX Item "--adjust-vma=offset"
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\*(C`\-b \f(CIbfdname\f(CW\*(C'\fR" 4
.IX Item "-b bfdname"
.Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
.IX Item "--target=bfdname"
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,
.Sp
.Vb 1
\& objdump -b oasys -m vax -h fu.o
.Ve
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`\-C\*(C'\fR" 4
.IX Item "-C"
.Ip "\f(CW\*(C`\-\-demangle[=\f(CIstyle\f(CW]\*(C'\fR" 4
.IX Item "--demangle[=style]"
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\*(C`\-G\*(C'\fR" 4
.IX Item "-G"
.Ip "\f(CW\*(C`\-\-debugging\*(C'\fR" 4
.IX Item "--debugging"
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\*(C`\-d\*(C'\fR" 4
.IX Item "-d"
.Ip "\f(CW\*(C`\-\-disassemble\*(C'\fR" 4
.IX Item "--disassemble"
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\*(C`\-D\*(C'\fR" 4
.IX Item "-D"
.Ip "\f(CW\*(C`\-\-disassemble\-all\*(C'\fR" 4
.IX Item "--disassemble-all"
Like \fB\-d\fR, but disassemble the contents of all sections, not just
those expected to contain instructions.
.Ip "\f(CW\*(C`\-\-prefix\-addresses\*(C'\fR" 4
.IX Item "--prefix-addresses"
When disassembling, print the complete address on each line. This is
the older disassembly format.
.Ip "\f(CW\*(C`\-\-disassemble\-zeroes\*(C'\fR" 4
.IX Item "--disassemble-zeroes"
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\*(C`\-EB\*(C'\fR" 4
.IX Item "-EB"
.Ip "\f(CW\*(C`\-EL\*(C'\fR" 4
.IX Item "-EL"
.Ip "\f(CW\*(C`\-\-endian={big|little}\*(C'\fR" 4
.IX Item "--endian={big|little}"
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\*(C`\-f\*(C'\fR" 4
.IX Item "-f"
.Ip "\f(CW\*(C`\-\-file\-header\*(C'\fR" 4
.IX Item "--file-header"
Display summary information from the overall header of
each of the \fIobjfile\fR files.
.Ip "\f(CW\*(C`\-\-file\-start\-context\*(C'\fR" 4
.IX Item "--file-start-context"
Specify that when displaying interlisted source code/disassembly
(assumes '\-S') from a file that has not yet been displayed, extend the
context to the start of the file.
.Ip "\f(CW\*(C`\-h\*(C'\fR" 4
.IX Item "-h"
.Ip "\f(CW\*(C`\-\-section\-header\*(C'\fR" 4
.IX Item "--section-header"
.Ip "\f(CW\*(C`\-\-header\*(C'\fR" 4
.IX Item "--header"
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(CW\*(C`ld\*(C'\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(CW\*(C`ld\*(C'\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\*(C`\-\-help\*(C'\fR" 4
.IX Item "--help"
Print a summary of the options to \f(CW\*(C`objdump\*(C'\fR and exit.
.Ip "\f(CW\*(C`\-i\*(C'\fR" 4
.IX Item "-i"
.Ip "\f(CW\*(C`\-\-info\*(C'\fR" 4
.IX Item "--info"
Display a list showing all architectures and object formats available
for specification with \fB\-b\fR or \fB\-m\fR.
.Ip "\f(CW\*(C`\-j \f(CIname\f(CW\*(C'\fR" 4
.IX Item "-j name"
.Ip "\f(CW\*(C`\-\-section=\f(CIname\f(CW\*(C'\fR" 4
.IX Item "--section=name"
Display information only for section \fIname\fR.
.Ip "\f(CW\*(C`\-l\*(C'\fR" 4
.IX Item "-l"
.Ip "\f(CW\*(C`\-\-line\-numbers\*(C'\fR" 4
.IX Item "--line-numbers"
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\*(C`\-m \f(CImachine\f(CW\*(C'\fR" 4
.IX Item "-m machine"
.Ip "\f(CW\*(C`\-\-architecture=\f(CImachine\f(CW\*(C'\fR" 4
.IX Item "--architecture=machine"
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\*(C`\-M \f(CIoptions\f(CW\*(C'\fR" 4
.IX Item "-M options"
.Ip "\f(CW\*(C`\-\-disassembler\-options=\f(CIoptions\f(CW\*(C'\fR" 4
.IX Item "--disassembler-options=options"
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', register 14 called 'lr' and register 15 called 'pc'. 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 ARM/Thumb 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\*(C`\-p\*(C'\fR" 4
.IX Item "-p"
.Ip "\f(CW\*(C`\-\-private\-headers\*(C'\fR" 4
.IX Item "--private-headers"
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\*(C`\-r\*(C'\fR" 4
.IX Item "-r"
.Ip "\f(CW\*(C`\-\-reloc\*(C'\fR" 4
.IX Item "--reloc"
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\*(C`\-R\*(C'\fR" 4
.IX Item "-R"
.Ip "\f(CW\*(C`\-\-dynamic\-reloc\*(C'\fR" 4
.IX Item "--dynamic-reloc"
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\*(C`\-s\*(C'\fR" 4
.IX Item "-s"
.Ip "\f(CW\*(C`\-\-full\-contents\*(C'\fR" 4
.IX Item "--full-contents"
Display the full contents of any sections requested.
.Ip "\f(CW\*(C`\-S\*(C'\fR" 4
.IX Item "-S"
.Ip "\f(CW\*(C`\-\-source\*(C'\fR" 4
.IX Item "--source"
Display source code intermixed with disassembly, if possible. Implies
\&\fB\-d\fR.
.Ip "\f(CW\*(C`\-\-show\-raw\-insn\*(C'\fR" 4
.IX Item "--show-raw-insn"
When disassembling instructions, print the instruction in hex as well as
in symbolic form. This is the default except when
\&\f(CW\*(C`\-\-prefix\-addresses\*(C'\fR is used.
.Ip "\f(CW\*(C`\-\-no\-show\-raw\-insn\*(C'\fR" 4
.IX Item "--no-show-raw-insn"
When disassembling instructions, do not print the instruction bytes.
This is the default when \f(CW\*(C`\-\-prefix\-addresses\*(C'\fR is used.
.Ip "\f(CW\*(C`\-G\*(C'\fR" 4
.IX Item "-G"
.Ip "\f(CW\*(C`\-\-stabs\*(C'\fR" 4
.IX Item "--stabs"
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\*(C`.stab\*(C'\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\*(C`\-\-start\-address=\f(CIaddress\f(CW\*(C'\fR" 4
.IX Item "--start-address=address"
Start displaying data at the specified address. This affects the output
of the \f(CW\*(C`\-d\*(C'\fR, \f(CW\*(C`\-r\*(C'\fR and \f(CW\*(C`\-s\*(C'\fR options.
.Ip "\f(CW\*(C`\-\-stop\-address=\f(CIaddress\f(CW\*(C'\fR" 4
.IX Item "--stop-address=address"
Stop displaying data at the specified address. This affects the output
of the \f(CW\*(C`\-d\*(C'\fR, \f(CW\*(C`\-r\*(C'\fR and \f(CW\*(C`\-s\*(C'\fR options.
.Ip "\f(CW\*(C`\-t\*(C'\fR" 4
.IX Item "-t"
.Ip "\f(CW\*(C`\-\-syms\*(C'\fR" 4
.IX Item "--syms"
Print the symbol table entries of the file.
This is similar to the information provided by the \fBnm\fR program.
.Ip "\f(CW\*(C`\-T\*(C'\fR" 4
.IX Item "-T"
.Ip "\f(CW\*(C`\-\-dynamic\-syms\*(C'\fR" 4
.IX Item "--dynamic-syms"
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\*(C`\-\-version\*(C'\fR" 4
.IX Item "--version"
Print the version number of \f(CW\*(C`objdump\*(C'\fR and exit.
.Ip "\f(CW\*(C`\-x\*(C'\fR" 4
.IX Item "-x"
.Ip "\f(CW\*(C`\-\-all\-header\*(C'\fR" 4
.IX Item "--all-header"
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\*(C`\-w\*(C'\fR" 4
.IX Item "-w"
.Ip "\f(CW\*(C`\-\-wide\*(C'\fR" 4
.IX Item "--wide"
Format some lines for output devices that have more than 80 columns.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "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 \s-1GNU\s0 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"\s-1GNU\s0 Free Documentation License\*(R".