From 9e4141bc7b318f3c2dbc66f56eaa43cbcf00533e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 14 Jul 1999 16:45:54 +0000 Subject: [PATCH] * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the same order seen for the main sections. Add OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS. --- ld/scripttempl/elf.sc | 44 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index afb4ac67c1c..3ffd3e17fa8 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -115,6 +115,9 @@ SECTIONS .gnu.version ${RELOCATING-0} : { *(.gnu.version) } .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } + + .rel.init ${RELOCATING-0} : { *(.rel.init) } + .rela.init ${RELOCATING-0} : { *(.rela.init) } .rel.text ${RELOCATING-0} : { *(.rel.text) @@ -127,18 +130,8 @@ SECTIONS ${RELOCATING+*(.rela.text.*)} ${RELOCATING+*(.rela.gnu.linkonce.t*)} } - .rel.data ${RELOCATING-0} : - { - *(.rel.data) - ${RELOCATING+*(.rel.data.*)} - ${RELOCATING+*(.rel.gnu.linkonce.d*)} - } - .rela.data ${RELOCATING-0} : - { - *(.rela.data) - ${RELOCATING+*(.rela.data.*)} - ${RELOCATING+*(.rela.gnu.linkonce.d*)} - } + .rel.fini ${RELOCATING-0} : { *(.rel.fini) } + .rela.fini ${RELOCATING-0} : { *(.rela.fini) } .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) @@ -151,20 +144,31 @@ SECTIONS ${RELOCATING+*(.rela.rodata.*)} ${RELOCATING+*(.rela.gnu.linkonce.r*)} } - .rel.got ${RELOCATING-0} : { *(.rel.got) } - .rela.got ${RELOCATING-0} : { *(.rela.got) } + ${OTHER_READONLY_RELOC_SECTIONS} + .rel.data ${RELOCATING-0} : + { + *(.rel.data) + ${RELOCATING+*(.rel.data.*)} + ${RELOCATING+*(.rel.gnu.linkonce.d*)} + } + .rela.data ${RELOCATING-0} : + { + *(.rela.data) + ${RELOCATING+*(.rela.data.*)} + ${RELOCATING+*(.rela.gnu.linkonce.d*)} + } .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) } .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) } - .rel.init ${RELOCATING-0} : { *(.rel.init) } - .rela.init ${RELOCATING-0} : { *(.rela.init) } - .rel.fini ${RELOCATING-0} : { *(.rel.fini) } - .rela.fini ${RELOCATING-0} : { *(.rela.fini) } + .rel.got ${RELOCATING-0} : { *(.rel.got) } + .rela.got ${RELOCATING-0} : { *(.rela.got) } + ${OTHER_GOT_RELOC_SECTIONS} .rel.bss ${RELOCATING-0} : { *(.rel.bss) } .rela.bss ${RELOCATING-0} : { *(.rela.bss) } .rel.plt ${RELOCATING-0} : { *(.rel.plt) } .rela.plt ${RELOCATING-0} : { *(.rela.plt) } + .init ${RELOCATING-0} : { KEEP (*(.init)) } =${NOP-0} ${DATA_PLT-${PLT}} .text ${RELOCATING-0} : @@ -214,7 +218,7 @@ SECTIONS we can shorten the on-disk segment size. */ .sdata ${RELOCATING-0} : { *(.sdata) *(.sdata.*) } ${RELOCATING+${OTHER_GOT_SECTIONS}} - ${RELOCATING+_edata = .;} + ${RELOCATING+_edata = .;} ${RELOCATING+PROVIDE (edata = .);} ${RELOCATING+__bss_start = .;} ${RELOCATING+${OTHER_BSS_SYMBOLS}} @@ -230,7 +234,7 @@ SECTIONS ${RELOCATING+. = ALIGN(${ALIGNMENT});} } ${RELOCATING+. = ALIGN(${ALIGNMENT});} - ${RELOCATING+_end = . ;} + ${RELOCATING+_end = .;} ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+PROVIDE (end = .);} -- 2.30.2