/* the entry point */ ENTRY(_start) SECTIONS { /* all sections located above 1MB */ . = 0x100000; /* multiboot header first (needs to reside within the first 8KB), * then the code itself */ .text BLOCK(4K) : ALIGN(4K) { *(.multiboot) *(.code) } /* to be sure that this kernel is identified as a multiboot one, * the GNU notes information should be placed inside the first 8K. * another option is to exclude this unqiue header with -Wl,--build-id=none */ .note.gnu.build-id BLOCK(4K) : ALIGN(4K) { *(.note.gnu.build-id) } /* read-only data */ .rodata BLOCK(4K) : ALIGN(4K) { *(.rodata*) } /* read-write data (initialized) */ .data BLOCK(4K) : ALIGN(4K) { *(.data*) } /* read-write data (uninitialized) and stack */ .bss BLOCK(4K) : ALIGN(4K) { *(COMMON) *(.bss) *(.bootstrap_stack) } }