aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@canonical.com>2020-11-16 14:20:23 +1300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-01-23 20:22:46 +0200
commitd4ab19e549803773b3246548c1ad645246b09e72 (patch)
treedc8ca5c9dcb58bdc902c1c481d461dc77f37a4d4
parentdwarf: Also match abbrev base when searching abbrev list (diff)
downloadbinutils-gdb-d4ab19e549803773b3246548c1ad645246b09e72.tar.gz
binutils-gdb-d4ab19e549803773b3246548c1ad645246b09e72.tar.bz2
binutils-gdb-d4ab19e549803773b3246548c1ad645246b09e72.zip
[GOLD] fix jump to long branch on powerpc
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) (cherry picked from commit f7b330574f32eb91881e56401fe0cd875a96df19)
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/powerpc.cc3
2 files changed, 7 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 03d99a52fe..03d2c9aa74 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 476fb4e588..79c25a637d 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -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;
}