Objdump: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
(installation)
Line 2: Line 2:


== Installation ==
== Installation ==
If you have a standard C/C++ development environment set up on your Linux box, you ought to already have the GNU binutils installed. Type 'objdump' to find out. If it's not there, then you probably need to install the development toolchain for your system. This version of objdump will know how to take apart files built for your particular CPU architecture.
If you want to take apart ELF files compiled for a different architecture, you will need to compile a new copy of the binutils for a separate architecture target:
* get the official binutils distribution: http://www.gnu.org/software/binutils/
* unpack and enter binutils directory
* ./configure --target=<arch> --prefix=<directory> --program-prefix=<prefix>
* make && make install
About the configure options:
* <arch> is the architecture to build for. Examine the file bfd/config.bfd to get an idea of what targets are available. As an example of what the target should look like, the target for PowerPC processor code stored in an ELF file is powerpc-elf.
* <directory> is the base directory for the new binutils toolchain to be stored in. It helps to keep this separate from the native toolchain.
* <prefix> indicates the prefix string that should be prepended to each of the binutils tool on installation. For example, if the program prefix is "powerpc-" then the built objdump tool will be named powerpc-objdump.


== Common Usage ==
== Common Usage ==


[[Category:RE Tools]]
[[Category:RE Tools]]

Revision as of 12:53, 28 October 2006

objdump is a standard component of the GNU binutils. It is useful for obtaining all kinds of information from an ELF file. This page describes some of its more common reverse engineering applications

Installation

If you have a standard C/C++ development environment set up on your Linux box, you ought to already have the GNU binutils installed. Type 'objdump' to find out. If it's not there, then you probably need to install the development toolchain for your system. This version of objdump will know how to take apart files built for your particular CPU architecture.

If you want to take apart ELF files compiled for a different architecture, you will need to compile a new copy of the binutils for a separate architecture target:

  • get the official binutils distribution: http://www.gnu.org/software/binutils/
  • unpack and enter binutils directory
  • ./configure --target=<arch> --prefix=<directory> --program-prefix=<prefix>
  • make && make install

About the configure options:

  • <arch> is the architecture to build for. Examine the file bfd/config.bfd to get an idea of what targets are available. As an example of what the target should look like, the target for PowerPC processor code stored in an ELF file is powerpc-elf.
  • <directory> is the base directory for the new binutils toolchain to be stored in. It helps to keep this separate from the native toolchain.
  • <prefix> indicates the prefix string that should be prepended to each of the binutils tool on installation. For example, if the program prefix is "powerpc-" then the built objdump tool will be named powerpc-objdump.

Common Usage