This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] [GOLD] PowerPC TOC16 and GOT16 relocs are relative


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41874390758abfb68ab694dfd8b5c80862e84fd4

commit 41874390758abfb68ab694dfd8b5c80862e84fd4
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Nov 19 16:59:36 2015 +1030

    [GOLD] PowerPC TOC16 and GOT16 relocs are relative
    
    	* powerpc.cc (Target_powerpc::Scan::get_reference_flags): Correct
    	GOT16 and TOC16 relocs to RELATIVE_REF.

Diff:
---
 gold/ChangeLog  | 4 ++++
 gold/powerpc.cc | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 32bb7ee..3604550 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,6 +1,10 @@
 2015-12-10  Alan Modra  <amodra@gmail.com>
 
 	Apply from master.
+	2015-11-19  Alan Modra  <amodra@gmail.com>
+	* powerpc.cc (Target_powerpc::Scan::get_reference_flags): Correct
+	GOT16 and TOC16 relocs to RELATIVE_REF.
+
 	2015-11-14  Cary Coutant  <ccoutant@gmail.com>
 	PR gold/19244
 	PR gold/18548
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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]