Operating system | Unix and Unix-like |
---|---|
Type | Command |
License | GNU 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.
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:
objdump(1)
– Linux User Commands Manualreadelf(1)
– Linux User Commands ManualThe GNU Binutils are a collection of binary tools. The main ones are:
But they also include:
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.
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:
git clone git://sourceware.org/git/binutils-gdb.git
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.
There is a bug-tracking system at https://sourceware.org/bugzilla/.
There are three binutils mailing lists:
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.
The documentation for binutils 2.36.1 is available.
A guide to porting the binutils to a new target has been contributed.