I have hands on with gcc compiler.
As per my knowledge, each compiler performs following actions:
Prep-processor expands your .c file with the content of header files and also based on the defined flags.
Compiler take that as an input file and does the following.
1. Syntax Analysis
2. Semantic Analysis
3. Intermediate code generation
4. Code optimization
5. Code generation
The final output of compiling step is assembly code.
Assembler take assembly code as input and generate object code and then linker links all the object code files and generates executable file.
Please correct me if I missed any steps or stated wrongly.