Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

objdump

Display information about one or more object files (GNU)

Syntax:

objdump_variant [ -a ] 
        [ -b bfdname ] [ --debugging ]
        [ -C ] [ -d ]
        [ -D ] [ --disassemble-zeroes ]
        [ -EB | -EL ]
        [ -f ]
        [ -h ]  [ -i ]
        [ -j section ]
        [ -l ]
        [ -m machine ]
        [ -r ] [ -R ]
        [ -S ] [ -s ] [ --stabs ]
        [ -t ] [ -T ] [ -x ]
        [ -w ] [ --start-address=address ]
        [ --stop-address=address ]
        [ --prefix-addresses]
        [ --[no-]show-raw-insn ]
        [ --adjust-vma=offset ]
        [ --version ]  [ --help ]
        objfile...

Runs on:

All supported hosts.

Options:

The objdump_variant depends on the target platform, as follows:

Target platform: objdump_variant:
All targets, plus native ntomulti-objdump
ARM ntoarm-objdump
PowerPC ntoppc-objdump
SH4 ntosh-objdump
x86 ntox86-objdump
-a
If any of the objfile files are archives, display the archive header information (in a format similar to ls -l). Besides the information you could list with ar -tv, objdump -a shows the object file format of each archive member.
-b bfdname
Specify that the object-code format for the object files is bfdname. This option isn't necessary with QNX Neutrino; objdump can automatically recognize many formats.

You can list the formats available with the -i option. For more information, see "Target Selection" in the appendix Selecting the Target System.

-C
Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes C++ function names readable.
-d
Display the assembler mnemonics for the machine instructions from objfile. This option disassembles only those sections that are expected to contain instructions.
-D
Like -d, but disassemble the contents of all sections, not just those expected to contain instructions.
-EB
-EL
Specify the endian-ness of the object files. This affects only disassembly. This can be useful when disassembling a file format that doesn't describe endian-ness information, such as S-records.
-f
Display summary information from the overall header of each of the objfile files.
-h
Display summary information from the section headers of the object file.

File segments may be relocated to nonstandard addresses, for example by using the -Ttext, -Tdata, or -Tbss options to ld. However, some object file formats, such as a.out, don't store the starting address of the file segments. In those situations, although ld relocates the sections correctly, using objdump -h to list the file section headers can't show the correct addresses. Instead, it shows the usual addresses, which are implicit for the target.

-i
Display a list showing all architectures and object formats available for specification with -b or -m.
-j name
Display information for section name only.
-l
("el") Label the display (using debugging information) with the filename and source line numbers corresponding to the object code or relocs shown. This option is useful only with -d, -D, or -r.
-m machine
Specify the architecture to use when disassembling object files. This can be useful when disassembling object files that don't describe architecture information, such as S-records. You can list the available architectures with the -i option.
-r
Print the relocation entries of the file. If used with -d or -D, the relocations are printed interspersed with the disassembly.
-R
Print the dynamic relocation entries of the file. This is meaningful only for dynamic objects, such as certain types of shared libraries.
-s
Display the full contents of any sections requested.
-S
Display source code intermixed with disassembly, if possible. This option works only for DWARF-2 and STABS debug formats; you need to compile the code with the -gdwarf-2 or -gstabs option. The -S option implies -d.
-t
Print the symbol table entries of the file. This is similar to the information provided by the nm program.
-T
Print the dynamic symbol table entries of the file. This is meaningful only for dynamic objects, such as certain types of shared libraries. This is similar to the information provided by the nm program when given the -D option.
-x
Display all available header information, including the symbol table and relocation entries. Using -x is equivalent to specifying all of -a -f -h -r -t.
-w
Format some lines for output devices that have more than 80 columns.

GNU extensions

--adjust-vma=offset
When dumping information, first add offset to all the section addresses. This is useful if the section addresses don't correspond to the symbol table, which can happen when putting sections at particular addresses when using a format that can't represent section addresses, such as a.out.
--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.
--disassemble-zeroes
Normally the disassembly output skips blocks of zeroes. This option directs the disassembler to disassemble those blocks, just like any other data.
--help
Print a summary of the options to objdump and exit.
--no-show-raw-insn
When disassembling instructions, don't print the instruction bytes. This is the default when --prefix-addresses is used.
--prefix-addresses
When disassembling, print the complete address on each line. This is the older disassembly format.
--show-raw-insn
When disassembling instructions, print the instruction in hex as well as in symbolic form. This is the default except when --prefix-addresses is used.
--stabs
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 useful only 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 --syms output. for more information, see "Stabs Overview" in The stabs debug format in the full online GNU documentation.
--start-address=address
Start displaying data at the specified address. This affects the output of the -d, -r and -s options.
--stop-address=address
Stop displaying data at the specified address. This affects the output of the -d, -r and -s options.
--version
Print the version number of objdump and exit.

Description:

The objdump utility displays information about one or more object files. The options control what particular information to display.

The objfile... arguments identify the object files to be examined. When you specify archives, objdump shows information on each of the member object files.

At least one option besides -l must be given.

Contributing author:

GNU

See also:

objcopy