“C Runtime” requires certain conditions, which are provided by assembly. The c language mainly requires a stack when running
The relationship between C language and stack: Local variables in C language are all implemented using the stack. If our assembly part does not pre-set a reasonable and legal stack address for the C part, then the local variables defined in the C code will fail and the entire program will die.
We usually do not set up the stack when writing microcontroller programs (such as 51 microcontroller) or writing applications, but the C program can still run. The reason is: a default available stack is provided during hardware initialization in the microcontroller. In fact, not all of the C programs we write in the application program. The compiler (gcc) will automatically add them one by one for us when linking. This header is a piece of assembly code that guides our C program to execute. This code helps our C program set up the stack and other runtime needs.