Summary: | gold powerpc inserts jump to middle of long branch stub | ||
---|---|---|---|
Product: | binutils | Reporter: | Michael Hudson-Doyle <michael.hudson> |
Component: | gold | Assignee: | Alan Modra <amodra> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amodra, doko, ian, michael.hudson |
Priority: | P2 | ||
Version: | 2.36 | ||
Target Milestone: | 2.36 | ||
Host: | Target: | powerpc64le-linux-gnu | |
Build: | Last reconfirmed: | 2020-11-16 00:00:00 |
Description
Michael Hudson-Doyle
2020-11-16 01:02:11 UTC
This not-thought-through at all patch: diff --git a/gold/powerpc.cc b/gold/powerpc.cc index b0d6a74bec..1ef8c47053 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -11092,10 +11092,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate( value = (stub_table->stub_address() + stub_table->plt_size() + ent->off_); - if (size == 64 - && r_type != elfcpp::R_PPC64_REL24_NOTOC) - value += (elfcpp::ppc64_decode_local_entry(ent->other_) - + ent->tocoff_); } has_stub_value = true; } fixes the issue for me. I certainly don't know if it would have other bad effects. (In reply to Michael Hudson-Doyle from comment #1) > This not-thought-through at all patch: More thought-through than the code it removes! If you post it to binutils@soureware.org with a ChangeLog entry I'll commit it for you. The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f1e05b19786669d29d59f48f26bc06ad67c221e2 commit f1e05b19786669d29d59f48f26bc06ad67c221e2 Author: Michael Hudson-Doyle <michael.hudson@canonical.com> Date: Mon Nov 16 14:20:23 2020 +1300 [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. The binutils-2_35-branch branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f7b330574f32eb91881e56401fe0cd875a96df19 commit f7b330574f32eb91881e56401fe0cd875a96df19 Author: Michael Hudson-Doyle <michael.hudson@canonical.com> Date: Mon Nov 16 14:20:23 2020 +1300 [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) Fixed |