OBJDUMP 1 2005-04-20 binutils-2.15.97 GNU Development Tools
NAME
objdump - display information from object files.
SYNOPSIS
objdump [--aa|----aarrcchhiivvee--hheeaaddeerrss]
[--bb _b_f_d_n_a_m_e|----ttaarrggeett==_b_f_d_n_a_m_e]
[--CC|----ddeemmaannggllee[=_s_t_y_l_e] ]
[--dd|----ddiissaasssseemmbbllee]
[--DD|----ddiissaasssseemmbbllee--aallll]
[--zz|----ddiissaasssseemmbbllee--zzeerrooeess]
[--EEBB|--EELL|----eennddiiaann=={big | little }]
[--ff|----ffiillee--hheeaaddeerrss]
[----ffiillee--ssttaarrtt--ccoonntteexxtt]
[--gg|----ddeebbuuggggiinngg]
[--ee|----ddeebbuuggggiinngg--ttaaggss]
[--hh|----sseeccttiioonn--hheeaaddeerrss|----hheeaaddeerrss]
[--ii|----iinnffoo]
[--jj _s_e_c_t_i_o_n|----sseeccttiioonn==_s_e_c_t_i_o_n]
[--ll|----lliinnee--nnuummbbeerrss]
[--SS|----ssoouurrccee]
[--mm _m_a_c_h_i_n_e|----aarrcchhiitteeccttuurree==_m_a_c_h_i_n_e]
[--MM _o_p_t_i_o_n_s|----ddiissaasssseemmbblleerr--ooppttiioonnss==_o_p_t_i_o_n_s]
[--pp|----pprriivvaattee--hheeaaddeerrss]
[--rr|----rreelloocc]
[--RR|----ddyynnaammiicc--rreelloocc]
[--ss|----ffuullll--ccoonntteennttss]
[--GG|----ssttaabbss]
[--tt|----ssyymmss]
[--TT|----ddyynnaammiicc--ssyymmss]
[--xx|----aallll--hheeaaddeerrss]
[--ww|----wwiiddee]
[----ssttaarrtt--aaddddrreessss==_a_d_d_r_e_s_s]
[----ssttoopp--aaddddrreessss==_a_d_d_r_e_s_s]
[----pprreeffiixx--aaddddrreesssseess]
[----[[nnoo--]]sshhooww--rraaww--iinnssnn]
[----aaddjjuusstt--vvmmaa==_o_f_f_s_e_t]
[----ssppeecciiaall--ssyymmss]
[--VV|----vveerrssiioonn]
[--HH|----hheellpp]
_o_b_j_f_i_l_e...
DESCRIPTION
oobbjjdduummpp 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.
_o_b_j_f_i_l_e... are the object files to be examined. When you
specify archives, oobbjjdduummpp shows information on each of the member
object files.
OPTIONS
The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
--aa,,--dd,,--DD,,--ee,,--ff,,--gg,,--GG,,--hh,,--HH,,--pp,,--rr,,--RR,,--ss,,--SS,,--tt,,--TT,,--VV,,--xx must be given.
-
--aa
-
-
----aarrcchhiivvee--hheeaaddeerr
If any of the _o_b_j_f_i_l_e files are archives, display the archive
-
header information (in a format similar to llss --ll). Besides the
information you could list with aarr ttvv, oobbjjdduummpp --aa shows
the object file format of each archive member.
-
----aaddjjuusstt--vvmmaa==_o_f_f_s_e_t
When dumping information, first add _o_f_f_s_e_t 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.
-
--bb _b_f_d_n_a_m_e
-
-
----ttaarrggeett==_b_f_d_n_a_m_e
Specify that the object-code format for the object files is
-
_b_f_d_n_a_m_e. This option may not be necessary; _o_b_j_d_u_m_p can
automatically recognize many formats.
For example,
objdump -b oasys -m vax -h fu.o
displays summary information from the section headers (--hh) of
_f_u_._o, which is explicitly identified (--mm) as a VAX object
file in the format produced by Oasys compilers. You can list the
formats available with the --ii option.
-
--CC
-
-
----ddeemmaannggllee[[==_s_t_y_l_e]]
Decode (_d_e_m_a_n_g_l_e) 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.
-
--gg
-
-
----ddeebbuuggggiinngg
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.
Some other types are supported by rreeaaddeellff --ww.
-
--ee
-
-
----ddeebbuuggggiinngg--ttaaggss
Like --gg, but the information is generated in a format compatible
-
with ctags tool.
-
--dd
-
-
----ddiissaasssseemmbbllee
Display the assembler mnemonics for the machine instructions from
-
_o_b_j_f_i_l_e. This option only disassembles those sections which are
expected to contain instructions.
-
--DD
-
-
----ddiissaasssseemmbbllee--aallll
Like --dd, but disassemble the contents of all sections, not just
-
those expected to contain instructions.
-
----pprreeffiixx--aaddddrreesssseess
When disassembling, print the complete address on each line. This is
-
the older disassembly format.
-
--EEBB
-
-
--EELL
-
-
----eennddiiaann=={{bbiigg||lliittttllee}}
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.
-
--ff
-
-
----ffiillee--hheeaaddeerrss
Display summary information from the overall header of
-
each of the _o_b_j_f_i_l_e files.
-
----ffiillee--ssttaarrtt--ccoonntteexxtt
Specify that when displaying interlisted source code/disassembly
-
(assumes --SS) from a file that has not yet been displayed, extend the
context to the start of the file.
-
--hh
-
-
----sseeccttiioonn--hheeaaddeerrss
-
-
----hheeaaddeerrss
Display summary information from the section headers of the
-
object file.
File segments may be relocated to nonstandard addresses, for example by
using the --TTtteexxtt, --TTddaattaa, or --TTbbssss options to
lldd. However, some object file formats, such as a.out, do not
store the starting address of the file segments. In those situations,
although lldd relocates the sections correctly, using oobbjjdduummpp
--hh to list the file section headers cannot show the correct addresses.
Instead, it shows the usual addresses, which are implicit for the
target.
-
--HH
-
-
----hheellpp
Print a summary of the options to oobbjjdduummpp and exit.
-
-
--ii
-
-
----iinnffoo
Display a list showing all architectures and object formats available
-
for specification with --bb or --mm.
-
--jj _n_a_m_e
-
-
----sseeccttiioonn==_n_a_m_e
Display information only for section _n_a_m_e.
-
-
--ll
-
-
----lliinnee--nnuummbbeerrss
Label the display (using debugging information) with the filename and
-
source line numbers corresponding to the object code or relocs shown.
Only useful with --dd, --DD, or --rr.
-
--mm _m_a_c_h_i_n_e
-
-
----aarrcchhiitteeccttuurree==_m_a_c_h_i_n_e
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 --ii option.
-
--MM _o_p_t_i_o_n_s
-
-
----ddiissaasssseemmbblleerr--ooppttiioonnss==_o_p_t_i_o_n_s
Pass target specific information to the disassembler. Only supported on
-
some targets. If it is necessary to specify more than one
disassembler option then multiple --MM options can be used or
can be placed together into a comma separated list.
If the target is an ARM architecture then this switch can be used to
select which register name set is used during disassembler. Specifying
--MM rreegg--nnaammee--ssttdd (the default) will select the register names as
used in ARM's instruction set documentation, but with register 13 called
'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying
--MM rreegg--nnaammeess--aappccss will select the name set used by the ARM
Procedure Call Standard, whilst specifying --MM rreegg--nnaammeess--rraaww will
just use rr followed by the register number.
There are also two variants on the APCS register naming scheme enabled
by --MM rreegg--nnaammeess--aattppccss and --MM rreegg--nnaammeess--ssppeecciiaall--aattppccss which
use the ARM/Thumb Procedure Call Standard naming conventions. (Either
with the normal register names or the special register names).
This option can also be used for ARM architectures to force the
disassembler to interpret all instructions as Thumb instructions by
using the switch ----ddiissaasssseemmbblleerr--ooppttiioonnss==ffoorrccee--tthhuummbb. This can be
useful when attempting to disassemble thumb code produced by other
compilers.
For the x86, some of the options duplicate functions of the --mm
switch, but allow finer grained control. Multiple selections from the
following may be specified as a comma separated string.
xx8866--6644, ii338866 and ii88008866 select disassembly for
the given architecture. iinntteell and aatttt select between
intel syntax mode and AT&T syntax mode. aaddddrr3322,
aaddddrr1166, ddaattaa3322 and ddaattaa1166 specify the default
address size and operand size. These four options will be overridden if
xx8866--6644, ii338866 or ii88008866 appear later in the
option string. Lastly, ssuuffffiixx, when in AT&T mode,
instructs the disassembler to print a mnemonic suffix even when the
suffix could be inferred by the operands.
For PPC, bbooookkee, bbooookkee3322 and bbooookkee6644 select
disassembly of BookE instructions. 3322 and 6644 select
PowerPC and PowerPC64 disassembly, respectively.
For MIPS, this option controls the printing of instruction mneumonic
names and register names in disassembled instructions. Multiple
selections from the following may be specified as a comma separated
string, and invalid options are ignored:
-
"no-aliases"
Print the 'raw' instruction mneumonic instead of some pseudo
-
instruction mneumonic. I.E. print 'daddu' or 'or' instead of 'move',
'sll' instead of 'nop', etc.
-
"gpr-names=ABI"
Print GPR (general-purpose register) names as appropriate
-
for the specified ABI. By default, GPR names are selected according to
the ABI of the binary being disassembled.
-
"fpr-names=ABI"
Print FPR (floating-point register) names as
-
appropriate for the specified ABI. By default, FPR numbers are printed
rather than names.
-
"cp0-names=ARCH"
Print CP0 (system control coprocessor; coprocessor 0) register names
-
as appropriate for the CPU or architecture specified by
_A_R_C_H. By default, CP0 register names are selected according to
the architecture and CPU of the binary being disassembled.
-
"hwr-names=ARCH"
Print HWR (hardware register, used by the "rdhwr" instruction) names
-
as appropriate for the CPU or architecture specified by
_A_R_C_H. By default, HWR names are selected according to
the architecture and CPU of the binary being disassembled.
-
"reg-names=ABI"
Print GPR and FPR names as appropriate for the selected ABI.
-
-
"reg-names=ARCH"
Print CPU-specific register names (CP0 register and HWR names)
-
as appropriate for the selected CPU or architecture.
For any of the options listed above, _A_B_I or
_A_R_C_H may be specified as nnuummeerriicc to have numbers printed
rather than names, for the selected types of registers.
You can list the available values of _A_B_I and _A_R_C_H using
the ----hheellpp option.
-
--pp
-
-
----pprriivvaattee--hheeaaddeerrss
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.
-
--rr
-
-
----rreelloocc
Print the relocation entries of the file. If used with --dd or
-
--DD, the relocations are printed interspersed with the
disassembly.
-
--RR
-
-
----ddyynnaammiicc--rreelloocc
Print the dynamic relocation entries of the file. This is only
-
meaningful for dynamic objects, such as certain types of shared
libraries.
-
--ss
-
-
----ffuullll--ccoonntteennttss
Display the full contents of any sections requested. By default all
-
non-empty sections are displayed.
-
--SS
-
-
----ssoouurrccee
Display source code intermixed with disassembly, if possible. Implies
-
--dd.
-
----sshhooww--rraaww--iinnssnn
When disassembling instructions, print the instruction in hex as well as
-
in symbolic form. This is the default except when
----pprreeffiixx--aaddddrreesssseess is used.
-
----nnoo--sshhooww--rraaww--iinnssnn
When disassembling instructions, do not print the instruction bytes.
-
This is the default when ----pprreeffiixx--aaddddrreesssseess is used.
-
--GG
-
-
----ssttaabbss
Display the full contents of any sections requested. Display the
-
contents of the .stab and .stab.index and .stab.excl sections from an
ELF file. This is only useful on systems (such as Solaris 2.0) in which
".stab" debugging symbol-table entries are carried in an ELF
section. In most other file formats, debugging symbol-table entries are
interleaved with linkage symbols, and are visible in the ----ssyymmss
output.
-
----ssttaarrtt--aaddddrreessss==_a_d_d_r_e_s_s
Start displaying data at the specified address. This affects the output
-
of the --dd, --rr and --ss options.
-
----ssttoopp--aaddddrreessss==_a_d_d_r_e_s_s
Stop displaying data at the specified address. This affects the output
-
of the --dd, --rr and --ss options.
-
--tt
-
-
----ssyymmss
Print the symbol table entries of the file.
-
This is similar to the information provided by the nnmm program.
-
--TT
-
-
----ddyynnaammiicc--ssyymmss
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 nnmm
program when given the --DD (----ddyynnaammiicc) option.
-
----ssppeecciiaall--ssyymmss
When displaying symbols include those which the target considers to be
-
special in some way and which would not normally be of interest to the
user.
-
--VV
-
-
----vveerrssiioonn
Print the version number of oobbjjdduummpp and exit.
-
-
--xx
-
-
----aallll--hheeaaddeerrss
Display all available header information, including the symbol table and
-
relocation entries. Using --xx is equivalent to specifying all of
--aa --ff --hh --pp --rr --tt.
-
--ww
-
-
----wwiiddee
Format some lines for output devices that have more than 80 columns.
-
Also do not truncate symbol names when they are displayed.
-
--zz
-
-
----ddiissaasssseemmbbllee--zzeerrooeess
Normally the disassembly output will skip blocks of zeroes. This
-
option directs the disassembler to disassemble those blocks, just like
any other data.
SEE ALSO
_n_m(1), _r_e_a_d_e_l_f(1), and the Info entries for _b_i_n_u_t_i_l_s.
COPYRIGHT
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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 ``GNU Free Documentation License''.