PR ld/11012
authorAlan Modra <amodra@gmail.com>
Wed, 9 Dec 2009 01:26:03 +0000 (01:26 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 9 Dec 2009 01:26:03 +0000 (01:26 +0000)
* emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Move .rela.opd ..
(INITIAL_RELOC_SECTIONS): .. to here.  New define.
* scripttempl/elf.sc: Expand INITIAL_RELOC_SECTIONS.

ld/ChangeLog
ld/emulparams/elf64ppc.sh
ld/scripttempl/elf.sc

index 1c8994c..0abce2d 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-09  Alan Modra  <amodra@bigpond.net.au>
+
+       PR ld/11012
+       * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Move .rela.opd ..
+       (INITIAL_RELOC_SECTIONS): .. to here.  New define.
+       * scripttempl/elf.sc: Expand INITIAL_RELOC_SECTIONS.
+
 2009-12-04  Jie Zhang  <jie.zhang@analog.com>
 
        * ld.texinfo: Make it clear that --nmagic disables linking
index b9631b6..c9337ea 100644 (file)
@@ -28,9 +28,11 @@ else
   .got         0 : { *(.got) }
   .toc         0 : { *(.toc) }"
 fi
+# Put .opd relocs first so ld.so will process them before any ifunc relocs.
+INITIAL_RELOC_SECTIONS="
+  .rela.opd    ${RELOCATING-0} : { *(.rela.opd) }"
 OTHER_GOT_RELOC_SECTIONS="
   .rela.toc    ${RELOCATING-0} : { *(.rela.toc) }
-  .rela.opd    ${RELOCATING-0} : { *(.rela.opd) }
   .rela.branch_lt      ${RELOCATING-0} : { *(.rela.branch_lt) }"
 OTHER_READWRITE_SECTIONS="
   .toc1                ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
index 886f578..5378afa 100644 (file)
@@ -311,6 +311,7 @@ else
   COMBRELOCCAT="cat > $COMBRELOC"
 fi
 eval $COMBRELOCCAT <<EOF
+  ${INITIAL_RELOC_SECTIONS}
   .rel.init     ${RELOCATING-0} : { *(.rel.init) }
   .rela.init    ${RELOCATING-0} : { *(.rela.init) }
   .rel.text     ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }