Debugger Tool Objdump in Linux
Debugger Tool objdump: C feel more familiar and C compiler exist in every operating system .Basically Linux is a free operating system that every has to access it and x86 processors are most popular processor but currently x64 based processor popular because of its performance.
GNU Compiler collection (GCC) is a free compiler in Linux and it translate C program into machine language that processor can be understand .we can take a simple program to show how to see machine code in Linux operating system.
the output translate file is executable binary file which is show an above in picture called “a.out” file is by default you can executer is directly or either is way ,this method is best because some time we have change the permission of file.
C Output file
The Binary “a.out” file instruction are written is machine language,a Compiler are design to translate c program into variety of Computer Architecture.In this case we can use Amd x64 based Architecture.
the above program is written in C programming Language the first line is tells about the compiler to include header for standard Input/Output name “stdio” .This header file is include or added into the program when compiled.And this header file is located at /usr/include/stdio.h and it define several constant and prototype.
Each Architecture has different machine language and Linux Compiler are translate C program or instruction into current Architecture Machine language.The GNU development tool include “objdump ” ow called as Debugger Tool which is use to examin the compiler binary,the machine code the main() program translate .Lets do it.
the benefit of use Debugger Tool objdump program is to split output too many lines to easy examine,the grep command is use to display only only 20 lines after expression main.:, above machine code each byte is represent into hexadecimal .