ENTRY(_start) OUTPUT_FORMAT(elf32-i386) VADDR_BASE = 0xc0000000; SECTIONS { /* * First put the multiboot header, as it is required to be put very early * early in the image or the bootloader won't recognize the file format. */ . = 0; .multiboot : { *(.multiboot.header) } /* Begin putting sections at 4 MiB */ . = VADDR_BASE; .text ALIGN(4K) : AT(ADDR(.text) - VADDR_BASE + 4M) { begin_text = .; *(.multiboot.text) *(.text*) end_text = .; } /* Read-only data. */ .rodata ALIGN(4K) : AT(ADDR(.rodata) - VADDR_BASE + 4M) { begin_rodata = .; *(.rodata*) end_rodata = .; } /* Read-write data (initialized) */ .data ALIGN(4K) : AT(ADDR(.data) - VADDR_BASE + 4M) { begin_data = .; begin_constinit = .; *(.constinit) end_constinit = .; begin_ctors = .; KEEP(*(.init_array)); /* global constructors */ end_ctors = .; *(.data) end_data = .; } /* Read-write data (uninitialized) and stack */ .bss ALIGN(4K) : AT(ADDR(.bss) - VADDR_BASE + 4M) { begin_bss = .; *(.pages) *(.bss*) *(.stack) end_bss = .; } }