]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[GOLD] fix jump to long branch on powerpc
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 16 Nov 2020 01:20:23 +0000 (14:20 +1300)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Nov 2020 10:29:53 +0000 (20:59 +1030)
PR 26902
* powerpc.cc (Relocate::relocate): Do not include local entry
offset of target function when computing the address of a stub.

gold/ChangeLog
gold/powerpc.cc

index cb2ad727067ca43f804e89cbf7f43c41b06fa5e2..937bb28dde0bb3087f36c118495435431cce7613 100644 (file)
@@ -1,3 +1,9 @@
+2020-11-16  Michael Hudson-Doyle  <michael.hudson@canonical.com>
+
+       PR 26902
+       * powerpc.cc (Relocate::relocate): Do not include local entry
+       offset of target function when computing the address of a stub.
+
 2020-11-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gold/26200
index b0d6a74bec5ac477918091190ff906d1a417fbbc..fcbe71fbd309009a5c6d147b4b53d1075d8cc1db 100644 (file)
@@ -11094,8 +11094,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
                               + ent->off_);
                      if (size == 64
                          && r_type != elfcpp::R_PPC64_REL24_NOTOC)
-                       value += (elfcpp::ppc64_decode_local_entry(ent->other_)
-                                 + ent->tocoff_);
+                       value += ent->tocoff_;
                    }
                  has_stub_value = true;
                }