1PHDRS 2{ 3 rodata PT_LOAD FILEHDR PHDRS FLAGS (4); 4 btext PT_LOAD FLAGS (0x08000005); 5 text PT_LOAD; 6 data PT_LOAD; 7 random PT_OPENBSD_RANDOMIZE; 8 syscalls PT_OPENBSD_SYSCALLS; 9 relro PT_GNU_RELRO; 10 dynamic PT_DYNAMIC; 11 note PT_NOTE; 12} 13 14SECTIONS 15{ 16 . = 0 + SIZEOF_HEADERS; 17 /* RODATA */ 18 .gnu.hash : { *(.gnu.hash) } :rodata 19 .dynsym : { *(.dynsym) } :rodata 20 .dynstr : { *(.dynstr) } :rodata 21 .rodata : { *(.rodata .rodata.*) } :rodata 22 .eh_frame : { *(.eh_frame) } :rodata 23 24 /* TEXT */ 25 . = ALIGN(0x1000); 26 .boot.text : 27 { 28 boot_text_start = .; 29 . = ALIGN(0x1000); 30 *(.boot.text) 31 boot_text_end = .; 32 } :btext =0xf400fc01 33 . = ALIGN(0x1000); 34 .text : { *(.text .text.*) } :text =0xf400fc01 35 36 /* RELRO DATA */ 37 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000); 38 .openbsd.randomdata : { *(.openbsd.randomdata .openbsd.randomdata.*) } 39 :data :relro :random 40 .openbsd.syscalls : { *(.openbsd.syscalls .openbsd.syscalls.*) } 41 :syscalls 42 43 .data.rel.ro : { *(.data.rel.ro.local*) *(.data.rel.ro*) } :data :relro 44 .dynamic : { *(.dynamic) } :data :relro :dynamic 45 .got : { *(.got.plt) *(.got) } :data :relro 46 . = DATA_SEGMENT_RELRO_END (0, .); 47 48 /* BOOTDATA */ 49 . = ALIGN(0x1000); 50 boot_data_start = .; 51 .rela.dyn : 52 { 53 *(.rela.text .rela.text.*) 54 *(.rela.rodata .rela.rodata.*) 55 *(.rela.data .rela.data.*) 56 *(.rela.got) 57 *(.rela.bss .rela.bss.*) 58 } :data 59 .rela.plt : { *(.rela.plt) } :data 60 .note : { *(.note.openbsd.*) } :data :note 61 .hash : { *(.hash) } :data 62 .boot.data : { *(.boot.data .boot.data.*) } :data 63 64 /* DATA */ 65 . = ALIGN(0x1000); 66 .data : { *(.data .data.*) } :data 67 .bss : { *(.dynbss) *(.bss .bss.*) *(COMMON) } :data 68 . = DATA_SEGMENT_END (.); 69} 70