Having access to an analysis tool when dealing with compiled executables is always useful. In Linux, ObjDump is one such tool, which can be used to extract information from object files.
This article provides an overview of various ObjDump command-line options and their use. We will take a simple Hello World program written in x86 assembly as our target program and run ObjDump against it.
See the next previous in the series, Debugging your first x86 program.
What is ObjDump?
As mentioned at the beginning of the article, ObjDump is a useful utility to extract information from object files. This tool comes pre-installed with the majority of the Linux distributions. Following are the help options available when running ObjDump.
Usage: objdump <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, –archive-headers Display archive header information
-f, –file-headers Display the contents of the overall file header
-p, –private-headers Display object format specific file header contents
-P, –private=OPT,OPT… Display object format specific contents
-h, –[section-]headers Display the contents of the section headers
-x, –all-headers Display the contents of all