ENTRY(_start) OUTPUT_FORMAT(elf32-i386) SECTIONS { /* Begin putting sections at 1 MiB */ . = 1M; /* 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. */ .multiboot : { *(.multiboot.header) *(.multiboot.text) } .text : { *(.text*) } /* Read-only data. */ .rodata : { *(.rodata*) } /* Read-write data (initialized) */ .data : { start_ctors = .; KEEP(*(.init_array)); /* global constructors */ end_ctors = .; begin_constinit = .; *(.constinit) end_constinit = .; *(.data) } /* Read-write data (uninitialized) and stack */ .bss : { *(.bss) *(.stack) } }