The gcc compiler is a portable compiler,today it runs on different platforms .its wide use going on programming. programming in c here are different 4 stages compilation of a program: 1.Preprocessing:During the compilation is started off with preprocessing the directivies.The preprocessor is a separate program but it is invoked automatically by gcc for examle,the '#include<stdio.h>', the preprocessor read contents of this header file stdio.h and insert it directly into the program text. for example its changed a file named hello.c to hello.i.
2.Compilation:The second stage of the compilation process compilation.The preprocessed code is translated to assembly instructions.This form an intermediate human readable language.for example,file named hello.i changed to hello.s
3.Assembly:In this stage,an assembleris used to translate the assembly instructions in to object file.As instance a file named 'hello world.s' changed to named hello.o .
4.Linking:it is final stage of compilation.This stage links object file to produce final executable file.the object code generated in the assembly stage is composed of machine instructions that the processor understands but some pieces have to be rearranged and the missing ones filled in.This process is called linking.it includes executable link format,code segment,data segment. After linking the file loaded to the memory (RAM).