- crt stands for C runtime.
- crt is a set of execution startup routines compiled into a program which performs any initialization work required before calling the program’s main function. It is a basic runtime library/system.
- The work performed by crt depends on the ABI, machine, compiler, operating system and C standard library implementation.
The C Runtime system must carry out the following tasks.
- Set up the target platform in a consistent state. For example setting up appropriate exception vectors.
- Initialize the stack and frame pointers
- Invoke the C constructor initialization and ensure destructors are called on exit.
- Carry out any further platform specific initialization.
- Call the C
- Exit with the return code supplied if the C
mainfunction ever terminates.