The startup file crt0 is used to initialize the stack, install the data section (initialized variables), clear the bss section (uninitialized global and static variables), prepare and jump to the main. The startup file is automatically linked at beginning of each program. It is possible to avoid to use the default crt0 by doing the following:
- Write your own startup code. This can be written in C or in assembly. The entry point should be named _start.
- Pass the -nostartfiles option to m6811-elf-gcc during the final link. This option suppresses the link with the crt0 file.
|