Fix "PowerPC64 ELFv2 entry code" for big-endian
authorAlan Modra <amodra@gmail.com>
Wed, 3 Feb 2016 13:55:56 +0000 (00:25 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Feb 2016 14:01:14 +0000 (00:31 +1030)
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
for big-endian.
gold/
* powerpc.cc (relocate): Adjust last patch for big-endian.

bfd/ChangeLog
bfd/elf64-ppc.c
gold/ChangeLog
gold/powerpc.cc

index ff74998aca70b94fe97306960fa42b3e9c059db2..93bfe05ee89a1e5ad9b8382c4d6c3d2de56a2c49 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-04  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
+       for big-endian.
+
 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/19542
index 369eae52f146b621798d9ed102e688f93b55e3f6..f0bcee1687f73f9f4aae0b0436d047ef7a630dde 100644 (file)
@@ -13915,7 +13915,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
          if (!bfd_link_pic (info)
              && !info->traditional_format
              && !htab->opd_abi
-             && rel->r_addend == 0
+             && rel->r_addend == d_offset
              && h != NULL && &h->elf == htab->elf.hgot
              && rel + 1 < relend
              && rel[1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_REL16_LO)
index c0b7e5607a22931dd380e0cbcae48e7d3d1b79d3..ae50474b604e86d9168af2bde07acdfd0839e9f8 100644 (file)
@@ -1,3 +1,7 @@
+2016-02-04  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (relocate): Adjust last patch for big-endian.
+
 2016-02-02  Alan Modra  <amodra@gmail.com>
 
        * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
index 6df2904b708e07bd826e1b05d020a5cbd4ec35c2..60530bab9842f3b1b2b2d1dceaafdcf8962a4176 100644 (file)
@@ -7727,7 +7727,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
              && preloc != NULL
              && target->abiversion() >= 2
              && !parameters->options().output_is_position_independent()
-             && rela.get_r_addend() == 4
+             && rela.get_r_addend() == d_offset + 4
              && gsym != NULL
              && strcmp(gsym->name(), ".TOC.") == 0)
            {
This page took 0.036332 seconds and 4 git commands to generate.