aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-22 12:39:50 +1030
committerAlan Modra <amodra@gmail.com>2015-01-22 15:42:45 +1030
commitb01a4b043a5b08e1208b1fedd61a6f3d65a328e0 (patch)
treecd6431e80039865ce540f1001fc7bd0623691352 /gold
parentb99e251379fd81716660e88b933f0bc015d6c6d8 (diff)
downloadgdb-b01a4b043a5b08e1208b1fedd61a6f3d65a328e0.zip
gdb-b01a4b043a5b08e1208b1fedd61a6f3d65a328e0.tar.gz
gdb-b01a4b043a5b08e1208b1fedd61a6f3d65a328e0.tar.bz2
[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 <got relocs>): Correct condition for need of ifunc plt entry. (Target_powerpc::Scan::global <got relocs>): Likewise.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/powerpc.cc8
2 files changed, 10 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 9a52a3e..48f46ce 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-22 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc (Target_powerpc::Scan::local <got relocs>): Correct
+ condition for need of ifunc plt entry.
+ (Target_powerpc::Scan::global <got relocs>): Likewise.
+
2015-01-14 Sasa Stankovic <Sasa.Stankovic@imgtec.com>
* mips.cc (reloc_high): Add r_sym.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 04f2421..2eae938 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -5671,8 +5671,8 @@ Target_powerpc<size, big_endian>::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<size, big_endian>::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);