From: Alan Modra Date: Thu, 22 Jan 2015 02:09:50 +0000 (+1030) Subject: [GOLD] Correct powerpc64 ifunc plt entry test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b01a4b043a5b08e1208b1fedd61a6f3d65a328e0;p=binutils-gdb.git [GOLD] Correct powerpc64 ifunc plt entry test Found when attempting to build an ELFv2 Linux kernel. We don't generally need a plt entry for ELFv2 got relocs, only on ifunc, just like ppc32. * powerpc.cc (Target_powerpc::Scan::local ): Correct condition for need of ifunc plt entry. (Target_powerpc::Scan::global ): Likewise. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 9a52a3e86d1..48f46ce9f6f 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2015-01-22 Alan Modra + + * powerpc.cc (Target_powerpc::Scan::local ): Correct + condition for need of ifunc plt entry. + (Target_powerpc::Scan::global ): Likewise. + 2015-01-14 Sasa Stankovic * mips.cc (reloc_high): Add r_sym. diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 04f24212ad7..2eae938ca6e 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -5671,8 +5671,8 @@ Target_powerpc::Scan::local( if (!parameters->options().output_is_position_independent()) { - if ((size == 32 && is_ifunc) - || (size == 64 && target->abiversion() >= 2)) + if (is_ifunc + && (size == 32 || target->abiversion() >= 2)) got->add_local_plt(object, r_sym, GOT_TYPE_STANDARD); else got->add_local(object, r_sym, GOT_TYPE_STANDARD); @@ -6119,8 +6119,8 @@ Target_powerpc::Scan::global( got = target->got_section(symtab, layout); if (gsym->final_value_is_known()) { - if ((size == 32 && is_ifunc) - || (size == 64 && target->abiversion() >= 2)) + if (is_ifunc + && (size == 32 || target->abiversion() >= 2)) got->add_global_plt(gsym, GOT_TYPE_STANDARD); else got->add_global(gsym, GOT_TYPE_STANDARD);