Understanding the compilation process

Fernand Sierra
1 min readJun 18, 2021

For starters the compiler is built of different modules, pre-processor, compiler, assembler and linker.

The pre-processor is the first step to compile any C program and what the pre-processor does is that generates some intermediate file and this file is given to the compiler.

This brings us to the next step the compiler and it’s role is to convert the files generated by the pre-processor as an input and generates an assembly code. What it’s doing here is that it converted out C program files into the assembly language (binary code), however we still a converter which can convert this assembly code into machine code; this is where the assembler comes in.

The assembler this will convert the assembly code from earlier into the object code making it computer readable and gives it to the linker.

Now the linker’s role, when we write a C program we use libraries functions so what the linker does is that it will link our object code with those library code and generate it.

--

--