Skip to content

this is a small repo to show how the GCC compiler preforms various steps to get to the executable C file

Notifications You must be signed in to change notification settings

jaisharx/gcc-compilation-steps

Repository files navigation

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!

About

this is a small repo to show how the GCC compiler preforms various steps to get to the executable C file

Topics

Resources

Stars

Watchers

Forks