/* A program: from 4 MiB up, each kind of segment on pages of its own so the * kernel can map code executable, constants read-only and data writable. */ ENTRY(_start) SECTIONS { . = 0x400000; .text : { *(.text .text.*) } . = ALIGN(4096); .rodata : { *(.rodata .rodata.*) } . = ALIGN(4096); /* The GOT too: a PC's prebuilt `core` is position-independent and * reaches some symbols through it. */ .data : { *(.data .data.*) *(.got .got.*) } .bss : { *(.bss .bss.*) *(COMMON) } /DISCARD/ : { *(.comment) *(.note*) *(.eh_frame*) } }