Tuesday 7 April 2015

The Compilation Process

Compilation process is a sophisticated and a bit large process as it involves many things like:-

1)Pre-processing- In this step any pre-processing directories are included with hash tag include i.e. #include.

2)Parsing- An 'Internal representation' of code is prepared by gcc.

3)Static Changes- The compiler checks whether the declarations are right or not. Any errors found here are termed as "semantic errors".

4)Code Generation- "Internal representation " as done in step three is converted into byte code by the gcc compiler.

5)Linking- Any file or code that has to be linked to the file is linked here

6)Optimization- Small changes are done to free up space and reduce the time involved in compilation process. We will get in detail at this topic later on.

Compilation process has many advantages like knowing the compilation process helps you debug your code, optimize it , make it neater.

Here are the slides for this Post:-

https://docs.google.com/presentation/d/1VZEJo1Hh8zMR6eQcbo5OctPdzylvoaJ1MXYcvob5Msw/edit?usp=sharing

No comments:

Post a Comment