* elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
authorAlan Modra <amodra@gmail.com>
Wed, 30 Jan 2013 22:31:31 +0000 (22:31 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Jan 2013 22:31:31 +0000 (22:31 +0000)
bfd/ChangeLog
bfd/elf64-ppc.c

index ff85ec7a2e8c6860f67027c4e67eb208eb7e8787..8011d9ac4ca605570598b83ae6dffac90417b0d7 100644 (file)
@@ -1,3 +1,7 @@
+2013-01-31  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
+
 2013-01-28  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c: Use %T to print symbols names and remove redundant
index 2f6999bd09698ca99ed97645a1616439c27da4c5..eca7bb3a68e6dd868d9efde9ed1fbc5a13e217df 100644 (file)
@@ -9772,7 +9772,7 @@ build_plt_stub (struct ppc_link_hash_table *htab,
     {
       bfd_put_32 (obfd, CMPLDI_R2_0, p),                       p += 4;
       bfd_put_32 (obfd, BNECTR_P4, p),                         p += 4;
-      bfd_put_32 (obfd, B_DOT + cmp_branch_off, p),            p += 4;
+      bfd_put_32 (obfd, B_DOT | (cmp_branch_off & 0x3fffffc), p), p += 4;
     }
   else
     bfd_put_32 (obfd, BCTR, p),                                        p += 4;