Crt0 generally takes the form of an object file called crt0.o, often written in assembly language, which is automatically included by the linker into every executable file it builds.1
crt0 contains the most basic parts of the runtime library. As such, the exact work it performs depends on the program's compiler, operating system and C standard library implementation.2 Beside the initialization work required by the environment and toolchain, crt0 can perform additional operations defined by the programmer, such as executing C++ global constructors and C functions carrying GCC's ((constructor)) attribute.34
"crt" stands for "C runtime", and the zero stands for "the very beginning". However, when programs are compiled using GCC, it is also used for languages other than C. Alternative versions of crt0 are available for special usage scenarios; for example, to enable profiling with gprof, programs must be compiled with gcrt0 instead.5
This example is for Linux x86-64 with AT&T syntax, without an actual C runtime.
"The C Runtime Initialization, crt0.o". embecosm.com. 2010. Retrieved 2013-12-30. https://www.embecosm.com/appnotes/ean9/html/ch05s02.html ↩
"Program initialization: Creating a C library". osdev.org. 2014-02-25. Retrieved 2014-04-21. https://wiki.osdev.org/Creating_a_C_Library#Program_Initialization ↩
"Calling Global Constructors". osdev.org. 2014-04-08. Retrieved 2014-04-21. https://wiki.osdev.org/Calling_Global_Constructors ↩
"Compiling a Program for Profiling: GNU gprof". sourceware.org. Retrieved 2013-12-30. https://sourceware.org/binutils/docs-2.16/gprof/Compiling.html ↩