1c0197e40SguentherPHDRS 2c0197e40Sguenther{ 3c0197e40Sguenther rodata PT_LOAD FILEHDR PHDRS FLAGS (4); 47f8a129bSderaadt btext PT_LOAD FLAGS (0x08000005); 5*805b87eaSderaadt text PT_LOAD; 6c0197e40Sguenther data PT_LOAD; 7c0197e40Sguenther random PT_OPENBSD_RANDOMIZE; 883762a71Sderaadt syscalls PT_OPENBSD_SYSCALLS; 9c0197e40Sguenther relro PT_GNU_RELRO; 10c0197e40Sguenther dynamic PT_DYNAMIC; 11c0197e40Sguenther note PT_NOTE; 12c0197e40Sguenther} 13c0197e40Sguenther 14c0197e40SguentherSECTIONS 15c0197e40Sguenther{ 16c0197e40Sguenther /* RODATA */ 17c0197e40Sguenther . = 0 + SIZEOF_HEADERS; 18c0197e40Sguenther .ARM.exidx : { *(.ARM.exidx*) } :rodata 19c0197e40Sguenther .dynsym : { *(.dynsym) } :rodata 20c0197e40Sguenther .gnu.hash : { *(.gnu.hash) } :rodata 21c0197e40Sguenther .dynstr : { *(.dynstr) } :rodata 22c0197e40Sguenther .rodata : { *(.rodata .rodata.*) } :rodata 23c0197e40Sguenther .eh_frame : { *(.eh_frame) } :rodata 24c0197e40Sguenther 25c0197e40Sguenther /* TEXT */ 26c0197e40Sguenther . = ALIGN(0x10000); 27c0197e40Sguenther .boot.text : 28c0197e40Sguenther { 297f8a129bSderaadt . = ALIGN(0x1000); 30c0197e40Sguenther boot_text_start = .; 31c0197e40Sguenther *(.boot.text) 327f8a129bSderaadt . = ALIGN(0x1000); 33c0197e40Sguenther boot_text_end = .; 347f8a129bSderaadt } :btext 35*805b87eaSderaadt . = ALIGN(0x1000); 36*805b87eaSderaadt .text : { *(.text .text.*) } :text 37c0197e40Sguenther 38c0197e40Sguenther /* RELRO DATA */ 39c0197e40Sguenther . = DATA_SEGMENT_ALIGN (0x10000, 0x1000); 40c0197e40Sguenther .openbsd.randomdata : 41c0197e40Sguenther { 42c0197e40Sguenther *(.openbsd.randomdata .openbsd.randomdata.*) 43c0197e40Sguenther } :data :relro :random 4483762a71Sderaadt .openbsd.syscalls : 4583762a71Sderaadt { 4683762a71Sderaadt *(.openbsd.syscalls .openbsd.syscalls.*) 4783762a71Sderaadt } :syscalls 4883762a71Sderaadt 49c0197e40Sguenther .data.rel.ro : { *(.data.rel.ro.local*) *(.data.rel.ro*) } :data :relro 50c0197e40Sguenther .dynamic : { *(.dynamic) } :data :relro :dynamic 51c0197e40Sguenther .got : { *(.got.plt) *(.got) } :data :relro 52c0197e40Sguenther . = DATA_SEGMENT_RELRO_END (0, .); 53c0197e40Sguenther 54c0197e40Sguenther /* BOOTDATA */ 55c0197e40Sguenther . = ALIGN(0x1000); 56c0197e40Sguenther boot_data_start = .; 57c0197e40Sguenther .rel.dyn : 58c0197e40Sguenther { 59c0197e40Sguenther *(.rel.text .rel.text.*) 60c0197e40Sguenther *(.rel.rodata .rel.rodata.*) 61c0197e40Sguenther *(.rel.data .rel.data.*) 62c0197e40Sguenther *(.rel.got) 63c0197e40Sguenther *(.rel.bss .rel.bss.*) 64c0197e40Sguenther } :data 65c0197e40Sguenther/* XXX .rel.plt is unused but cannot delete: ld.bfd zeros DT_RELASZ then! */ 66c0197e40Sguenther .rel.plt : { *(.rel.plt) } :data 67c0197e40Sguenther .hash : { *(.hash) } :data 68c0197e40Sguenther .note : { *(.note.openbsd.*) } :data :note 69c0197e40Sguenther .boot.data : { *(.boot.data .boot.data.*) } :data 70c0197e40Sguenther boot_data_end = .; 71c0197e40Sguenther 72c0197e40Sguenther /* DATA */ 73c0197e40Sguenther . = ALIGN(0x1000); 74c0197e40Sguenther .data : { *(.data .data.*) } :data 75c0197e40Sguenther .bss : { *(.dynbss) *(.bss .bss.*) *(COMMON) } :data 76c0197e40Sguenther . = DATA_SEGMENT_END (.); 77c0197e40Sguenther 78c0197e40Sguenther /DISCARD/ : { *(.note.GNU-stack) } 79c0197e40Sguenther} 80