Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 559 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 559 Bytes

Understanding how GCC carries out compilation

Steps involved in GCC compilation:


1 Preprocessing

gcc -E -o step-1-preporcessing.c main.c

2 Compilation

gcc -S -o step-2-compilation.s step-1-preprocessing.c

3 Assembly

gcc -c -o step-3-assembly.o step-2-compilation.s

4 Linking

gcc -o step-4-linking step-3-assembly.o

5 Running

.\step-4-linking.exe

This repo is inspired by an YT video. Check it out here. Thanks!