objdump
Operating systemUnix and Unix-like
TypeCommand
LicenseGNU GPL

The llvm-objdump utility prints the contents of object files and final linked images named on the command line. If no file name is specified, llvm-objdump will attempt to read from a.out. If -is used as a file name, llvm-objdump will process a file on its standard input stream. Objdump 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. Are the object files to be examined. Objdump is a command-line program for displaying various information about object files on Unix-like operating systems. For instance, it can be used as a disassembler to view an executable in assembly form.

objdump is a command-line program for displaying various information about object files on Unix-likeoperating systems. For instance, it can be used as a disassembler to view an executable in assembly form. It is part of the GNU Binutils for fine-grained control over executables and other binary data. objdump uses the BFD library to read the contents of object files. Similar utilities are BorlandTDUMP, MicrosoftDUMPBIN and readelf.

Note that on certain platforms (e.g. macOS), the objdump binary may actually be a link to llvm's objdump, with different command-line options and behavior.

Example[edit]

For example,

This performs disassembly on the file «file.bin», with the assembly code shown in Intel syntax. We then redirect it to grep, which searches the main function and displays 20 lines of its code.

Example output:

See also[edit]

External links[edit]

  • objdump(1) – Linux User Commands Manual
  • readelf(1) – Linux User Commands Manual
  • Binutils::Objdump - Perl interface to objdump
Objdump
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Objdump&oldid=989139470'

GNU Binutils

The GNU Binutils are a collection of binary tools. The main ones are:

  • ld - the GNU linker.
  • as - the GNU assembler.

But they also include:

  • addr2line - Converts addresses into filenames and line numbers.
  • ar - A utility for creating, modifying and extracting from archives.
  • c++filt - Filter to demangle encoded C++ symbols.
  • dlltool - Creates files for building and using DLLs.
  • gold - A new, faster, ELF only linker, still in beta test.
  • gprof - Displays profiling information.
  • nlmconv - Converts object code into an NLM.
  • nm - Lists symbols from object files.
  • objcopy - Copies and translates object files.
  • objdump - Displays information from object files.
  • ranlib - Generates an index to the contents of an archive.
  • readelf - Displays information from any ELF format object file.
  • size - Lists the section sizes of an object or archive file.
  • strings - Lists printable strings from files.
  • strip - Discards symbols.
  • windmc - A Windows compatible message compiler.
  • windres - A compiler for Windows resource files.

Most of these programs use BFD, the Binary File Descriptor library, to do low-level manipulation. Many of them also use the opcodes library to assemble and disassemble machine instructions.

The binutils have been ported to most major Unix variants as well as Wintel systems, and their main reason for existence is to give the GNU system (and GNU/Linux) the facility to compile and link programs.

Obtaining binutils

The latest release of GNU binutils is 2.36.1. The various NEWS files (binutils, gas, and ld) have details of what has changed in this release.

See the SOFTWARE page for information on obtaining releases of GNU binutils and other GNU software. The current release can be downloaded from https://ftp.gnu.org/gnu/binutils or, preferably, from a nearby mirror through the generic URL https://ftpmirror.gnu.org/binutils.

If you plan to do active work on GNU binutils, you can access the development source tree by anonymous git:

Objdump

git clone git://sourceware.org/git/binutils-gdb.git

Objdump download

Alternatively, you can use the gitweb interface, or the source snapshots, available as bzipped tar files via anonymous FTP from ftp://sourceware.org/pub/binutils/snapshots.

Bug reports

There is a bug-tracking system at https://sourceware.org/bugzilla/.

Mailing lists

There are three binutils mailing lists:

Objdump Function Dependencies

<bug-binutils@gnu.org> (archives)
For reporting bugs.
<binutils@sourceware.org> (archives)
For discussing binutils issues.
binutils-cvs (archives)
A read-only mailing list containing the notes from checkins to the binutils git repository. (This list has an odd name for historical reasons.)

You can use this form to subscribe to the binutils@sourceware.org or binutils-cvs@sourceware.org mailing lists:

To subscribe to the bug-binutils@gnu.org mailing list, see the bug-binutils info page.

You may wish to browse the old mail archives of the gas2 and bfd mailing lists. These were the discussion lists for binutils until May 1999. Please do not send mail to them any longer.

Objdump -h

Documentation

Options

Objdump Download

The documentation for binutils 2.36.1 is available.

Objdump -g

A guide to porting the binutils to a new target has been contributed.