As you see there are total of 26 (only partial output is shown here). The following examples shows various sections. Information related to them can be printed using -h option. ![]() There can be various sections in an object file. Display the contents of the section headers using -h option The following example prints the object file format specific information. To know more about it, refer to our article on ELF file format.Ģ.Display object format specific file header contents using -p option NOTE: The executable format used in the examples is ELF. So we see that the information related to the overall file header was shown in the output. Display the contents of the overall file header using -f optionĬonsider the following example : $ objdump -f factorialĪrchitecture: i386:x86-64, flags 0x00000112: Note: The above is just a test code that was being used for some other purpose, but I found it simple enough to use for this article. The ELF binary file of the following C program is used in all the examples mentioned in this article. We will try to cover a good amount of them in this tutorial. ![]() There is a wide range of options available for this command. In this article, we will understand how to use objdump command through some examples.īasic syntax of objdump is : objdump objfile. This command is mainly used by the programmers who work on compilers, but still its a very handy tool for normal programmers also when it comes to debugging. Objdump command in Linux is used to provide thorough information on object files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |