From: Michael Hudson-Doyle Date: Mon, 16 Nov 2020 01:20:23 +0000 (+1300) Subject: [GOLD] fix jump to long branch on powerpc X-Git-Tag: binutils-2_35_2~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7b330574f32eb91881e56401fe0cd875a96df19;p=thirdparty%2Fbinutils-gdb.git [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) --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 03d99a52fe8..03d2c9aa743 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2020-11-16 Michael Hudson-Doyle + + 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 * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 476fb4e588d..79c25a637dd 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -11094,8 +11094,7 @@ Target_powerpc::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; }