Introduction of Object Code in Compiler Design

Let assume that, you have a c program, then you give the C program to compiler and compiler will produce the output in assembly code.Now, that assembly language code will give to the assembler and assembler is going to produce you some code. That is known as Object Code.


But, when you compile a program, then you are not going to use both compiler and assembler.You just take the program and give it to the compiler and compiler will give you the directly executable code. The compiler is actually combined inside the assembler along with loader and linker.So all the module kept together in the compiler software itself. So when you calling gcc, you are actually not just calling the compiler, you are calling the compiler, then assembler, then linker and loader.

Once you call the compiler, then your object code is going to present in Hard-disk. This object code contains various part –