Steps:
- The preprocessor expands macros (e.g. include stdio or define PI 3.14)
- In the compiling stage, the source code is
- a) parsed and turned into an intermediate representation,
- b) machine-specific assembly code is generated, and, finally,
- c) machine code is generated in an object file
- The |linker combines multiple object files into an executable
Stages: (Extra)
- Parser reads in C code,
- Checks for syntax errors,
- Forms intermediate code (tree representation)
- High-Level Optimizer Modifies intermediate code (processor-independent)
- Code Generator (Compilation)
- Creates assembly code step-by-step from each node of the intermediate code
- Allocates variable uses to registers Low-Level Optimizer
- Modifies assembly code (parts are processor-specific)
- Assembler Creates object code (machine code)
- Linker/Loader Creates executable image from object file
Application Binary Interface:
Defines rules which allow separately developed functions to work together like the arm architecure procedure call standard, C library ABI, and run time ABI
Examples:
standard:

preprocessor:

a)
b)
c)
