OUTPUT_ARCH(i386) SECTIONS { /* kernel will be loaded at 1MB by the boot loader */ . = 1M; /* .startup needs to be first for the entry point to be at 1MB */ .startup : { * (.startup); } /* the rest of the image sections */ .text : { * (.text); } .rodata : { * (.rodata); } .data : { * (.data); } /* create markers for the start/end of the .bss section so that startup * can initialize it to zero before transfering control to the C code. */ .bss ALIGN(4): { _bss_start = .; * (.bss); . = ALIGN(4); _bss_end = .; } _bss_size = SIZEOF(.bss); /* end of kernel marker. the allocator will mark all memory up to this * point as used. */ _kern_end = .; };