From 4602e5f40168a745bdde709c529d6c632c2a894a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 16 Jun 1997 23:21:18 +0000 Subject: [PATCH] Mon Jun 16 19:18:21 1997 Geoff Keating * scripttempl/elfppc.sc: Correct .rela.sdata entries. * scripttempl/elfppc.sc: Put the PLT between the small and large BSS segments. * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A program base of 0x02000000 is recommended...' because otherwise shared libraries are less efficient. We use 0x01800000 because otherwise it's impossible to branch to location 0, for instance if you have an undefined weak symbol. --- ld/ChangeLog | 12 ++++++++++++ ld/scripttempl/elfppc.sc | 11 ++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 2301d889e8d..b02d1032cfb 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,15 @@ +Mon Jun 16 19:18:21 1997 Geoff Keating + + * scripttempl/elfppc.sc: Correct .rela.sdata entries. + + * scripttempl/elfppc.sc: Put the PLT between the small and large + BSS segments. + * emulparams/elf32ppc.sh (TEXT_START_ADDR): The ABI says `A + program base of 0x02000000 is recommended...' because otherwise + shared libraries are less efficient. We use 0x01800000 because + otherwise it's impossible to branch to location 0, for instance if + you have an undefined weak symbol. + Mon Jun 16 12:49:36 1997 H.J. Lu * ldlang.c (lang_place_undefineds): Add \n in einfo call. diff --git a/ld/scripttempl/elfppc.sc b/ld/scripttempl/elfppc.sc index b6c542a4a9e..dd80edbca99 100644 --- a/ld/scripttempl/elfppc.sc +++ b/ld/scripttempl/elfppc.sc @@ -15,7 +15,6 @@ # .data section. # OTHER_BSS_SYMBOLS - symbols that appear at the start of the # .bss section besides __bss_start. -# DATA_PLT - .plt should be in data segment, not text segment. # # When adding sections, do note that the names of some sections are used # when specifying the start address of the next. @@ -53,6 +52,9 @@ SECTIONS .hash ${RELOCATING-0} : { *(.hash) } .dynsym ${RELOCATING-0} : { *(.dynsym) } .dynstr ${RELOCATING-0} : { *(.dynstr) } + .gnu.version ${RELOCATING-0} : { *(.gnu.version) } + .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } + .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } .rela.text ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) } .rela.data ${RELOCATING-0} : @@ -68,11 +70,10 @@ SECTIONS .rela.fini ${RELOCATING-0} : { *(.rela.fini) } .rela.bss ${RELOCATING-0} : { *(.rela.bss) } .rela.plt ${RELOCATING-0} : { *(.rela.plt) } - .rela.sdata ${RELOCATING-0} : { *(.rela.sdata2) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss2) } + .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) } + .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) } .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2) } .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2) } - ${DATA_PLT-${PLT}} .text ${RELOCATING-0} : { ${RELOCATING+${TEXT_START_SYMBOLS}} @@ -147,7 +148,6 @@ SECTIONS ${CREATE_SHLIB+${SBSS2}} ${RELOCATING+PROVIDE (_GOT_END_ = .);} - ${DATA_PLT+${PLT}} /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ @@ -161,6 +161,7 @@ SECTIONS *(.scommon) ${RELOCATING+PROVIDE (__sbss_end = .);} } + ${PLT} .bss ${RELOCATING-0} : { ${RELOCATING+${OTHER_BSS_SYMBOLS}} -- 2.30.2