when we write a simple c code main function is the one responsible for creating stack ?
For each and every c program you run , fork system call is called.
This fork() system call is responsible for Creating the memory regions(including stack) of our program.
But when the kernel starts , there is no fork system call.
So , there would be two options.
1. Assembly code in head.s & entry.s setup the stack.
2. Kernel runs without stack.
Correct me if i am wrong.