Open In App

Objdump Command in Linux with Examples

When we have an object file and we don’t have the source code with us and we have to find out the maximum information from the file. To do so objdump plays a very vital role. The main purpose of the objdump command is to help in debugging the object file. It is used for the following listed purposes:

Syntax :



objdump <option(s)> <file(s)>

Working with objdump command

1. To get the File headers of an Object File. This command will print all the File headers related information of the file.

objdump -f khushi



Here, Khushi is the name of the object file which you want to get the file headers of.

2. To print the object-specific file header content. This command will print the object-specific file header content of the file.

objdump -p khushi

Here, Khushi is the name of the object file which you want to get the file headers of.

3. To print the section header content of the file. This command will print all the section header related information of the file.

objdump -h khushiKhushi

Here, Khushi is the name of the object file which you want to get the file headers of.

4. To print the all header content of the file. This command will print all the content header related information of the file.

objdump -x khushi

Here, Khushi is the name of the object file which you want to get the file headers of.

5. To print the assembler content of the sections capable of execution. This command will print the content of the assembler of sections that are executable.

objdump -d khushi

Here, Khushi is the name of the object file which you want to get the file headers of.

6. To print the assembler content of all the sections of the file. This command will print all the assembler content of all the sections of the file.

objdump -D khushi

Here, Khushi is the name of the object file which you want to get the file headers of.

7. To print the complete content of all the sections of the file. This command will print all the content of all the sections of the file.

objdump -s khushi

Here, Khushi is the name of the object file which you want to get the file headers of.

8. To display the help section of the command. This command will display all the parameters and the values it could receive in order to process the file.

objdump --help

Article Tags :