summaryrefslogtreecommitdiff
path: root/debian/patches/gold-sparc-fix.diff
blob: 60598199407e5857754ec628e0eee60d320430fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Return-Path: <jrtc27@jrtc27.com>
Received: from Jamess-MacBook.local (global-184-8.nat-1.net.cam.ac.uk. [131.111.184.8])
        by smtp.gmail.com with ESMTPSA id h65sm4893155wrh.32.2017.04.28.09.13.06
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Apr 2017 09:13:06 -0700 (PDT)
Received: by Jamess-MacBook.local (Postfix, from userid 501)
	id 9CE3D18952FC; Fri, 28 Apr 2017 17:13:05 +0100 (BST)
From: James Clarke <jrtc27@jrtc27.com>
To: binutils@sourceware.org
Cc: James Clarke <jrtc27@jrtc27.com>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Cary Coutant <ccoutant@gmail.com>,
	"Jose E. Marchesi" <jose.marchesi@oracle.com>
Subject: [PATCH] gold: Fix assertion failure relaxing TLS for position-independent executables
Date: Fri, 28 Apr 2017 17:12:14 +0100
Message-Id: <20170428161214.83513-1-jrtc27@jrtc27.com>
X-Mailer: git-send-email 2.12.2

gold/
	PR gold/21444
	* gold.cc (Target_sparc::Relocate::relocate_tls): Local
	variables are final for position-independent executables. This
	has to be consistent with Target_sparc::Scan::local otherwise
	they will disagree as to whether local-exec is used.
---
 gold/sparc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gold/sparc.cc b/gold/sparc.cc
index a9cb93adda..54c7c33498 100644
--- a/gold/sparc.cc
+++ b/gold/sparc.cc
@@ -3730,7 +3730,7 @@ Target_sparc<size, big_endian>::Relocate::relocate_tls(
 
   const bool is_final =
     (gsym == NULL
-     ? !parameters->options().output_is_position_independent()
+     ? !parameters->options().shared()
      : gsym->final_value_is_known());
   const tls::Tls_optimization optimized_type
       = optimize_tls_reloc(is_final, r_type);
-- 
2.12.2