This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[GOLD] PowerPC TOC16 and GOT16 relocs are relative
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 19 Nov 2015 17:08:18 +1030
- Subject: [GOLD] PowerPC TOC16 and GOT16 relocs are relative
- Authentication-results: sourceware.org; auth=none
A pasto from x86_64, probably. BTW, looks to me like RELATIVE_REF
is write-only.
* powerpc.cc (Target_powerpc::Scan::get_reference_flags): Correct
GOT16 and TOC16 relocs to RELATIVE_REF.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 3a013ef..5441c52 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -5326,8 +5326,7 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
case elfcpp::R_PPC64_TOC16_HA:
case elfcpp::R_PPC64_TOC16_DS:
case elfcpp::R_PPC64_TOC16_LO_DS:
- // Absolute in GOT.
- ref = Symbol::ABSOLUTE_REF;
+ ref = Symbol::RELATIVE_REF;
break;
case elfcpp::R_POWERPC_GOT_TPREL16:
--
Alan Modra
Australia Development Lab, IBM