]> 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:40:08 +0000 (21:10 +1030)
PR 26902
* powerpc.cc (Relocate::relocate): Do not include local entry
offset of target function when computing the address of a stub.

(cherry picked from commit f1e05b19786669d29d59f48f26bc06ad67c221e2)

gold/ChangeLog
gold/powerpc.cc

index 03d99a52fe8dbb8a66918356e67b0b27c0100b87..03d2c9aa7437a1c8d03b043d05ce8e438f110a4d 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-10-09  Alan Modra  <amodra@gmail.com>
 
        * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do
index 476fb4e588d85f383b4d68bd9746d9ebb6be4bba..79c25a637dd48a818d103e02c6e629b3d6be48c3 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;
                }