f78 crt0, the main startup file Contents|Index|Previous|Next
 

crt0, the main startup file 

The crt0 (C RunTime 0) file contains the initial startup code.

Cygnus Solutions provides a crt0 file, although you may want to write your own crt0 file for each target. The crt0 file is usually written in assembler as ‘crt0.S’, and its object gets linked in first and bootstraps the rest of your application. The crt0 file defines a special symbol like _start that is both the default base address for the application and the first symbol in the executable binary image.

If you plan to use any routines from the standard C library, you’ll also need to implement the functions on which libgloss depends. The crt0 file accomplishes the following results. See also I/O support code.

0