ENTRY(_start) PHDRS { text PT_LOAD FLAGS(5); rodata PT_LOAD FLAGS(4); data PT_LOAD FLAGS(6); } SECTIONS { . = 0x80000000; .text : { KEEP(*(.text.prefix)) KEEP(*(.text.entry)) *(.text .text.*) } :text ASSERT(_start == 0x80000040, "Entry must skip the BRK prefix") ASSERT(SIZEOF(.text) <= 4096, "ELF probe code exceeds one page") . = 0x80001000; .rodata : { KEEP(*(.rodata.witness)) *(.rodata .rodata.*) } :rodata ASSERT(SIZEOF(.rodata) <= 4096, "ELF probe rodata exceeds one page") . = 0x80002000; .data : { KEEP(*(.data.input)) *(.data .data.*) } :data .bss (NOLOAD) : { KEEP(*(.bss.output)) *(.bss .bss.*) *(COMMON) } :data ASSERT(SIZEOF(.data) + SIZEOF(.bss) <= 4096, "ELF probe data exceeds one page") ASSERT(INPUT == 0x80002000, "input location") ASSERT(OUTPUT == 0x80002030, "output location") /DISCARD/ : { *(.eh_frame*) *(.comment*) *(.note*) } }