Related Articles

Related Articles

Objdump Command in Linux with Examples
  • Last Updated : 25 Aug, 2020

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:

  • To retrieve archive header
  • To get the offset of the file
  • To get the bfdname
  • To get the demangle
  • To debug the file
  • To disassemble the file
  • To retrieve the file headers

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

To get the File headers of an Object File

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

To print the object-specific file header content

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

To print the section header content of the file

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

To print the all header content of the file



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

To print the assembler content of the sections capable of execution

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

To print the assembler content of all the sections of the file

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

 To print the complete content of all the sections of the file

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

To display the help section of the command

My Personal Notes arrow_drop_up
Recommended Articles
Page :