<div dir="ltr">Nice!</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 17, 2016 at 6:34 PM, Rafael Espindola via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Sun Apr 17 20:34:20 2016<br>
New Revision: 266584<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=266584&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=266584&view=rev</a><br>
Log:<br>
Delete the now redundant pointsToLocalDynamicGotEntry.<br>
<br>
Modified:<br>
lld/trunk/ELF/Target.cpp<br>
lld/trunk/ELF/Target.h<br>
lld/trunk/ELF/Writer.cpp<br>
<br>
Modified: lld/trunk/ELF/Target.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=266584&r1=266583&r2=266584&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=266584&r1=266583&r2=266584&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Target.cpp (original)<br>
+++ lld/trunk/ELF/Target.cpp Sun Apr 17 20:34:20 2016<br>
@@ -75,7 +75,6 @@ public:<br>
void writeGotPltHeader(uint8_t *Buf) const override;<br>
uint32_t getDynRel(uint32_t Type) const override;<br>
uint32_t getTlsGotRel(uint32_t Type) const override;<br>
- bool pointsToLocalDynamicGotEntry(uint32_t Type) const override;<br>
bool isTlsLocalDynamicRel(uint32_t Type) const override;<br>
bool isTlsGlobalDynamicRel(uint32_t Type) const override;<br>
bool isTlsInitialExecRel(uint32_t Type) const override;<br>
@@ -104,7 +103,6 @@ public:<br>
RelExpr getRelExpr(uint32_t Type, const SymbolBody &S) const override;<br>
uint32_t getDynRel(uint32_t Type) const override;<br>
uint32_t getTlsGotRel(uint32_t Type) const override;<br>
- bool pointsToLocalDynamicGotEntry(uint32_t Type) const override;<br>
bool isTlsLocalDynamicRel(uint32_t Type) const override;<br>
bool isTlsGlobalDynamicRel(uint32_t Type) const override;<br>
bool isTlsInitialExecRel(uint32_t Type) const override;<br>
@@ -323,10 +321,6 @@ bool TargetInfo::needsThunk(uint32_t Typ<br>
<br>
bool TargetInfo::isTlsInitialExecRel(uint32_t Type) const { return false; }<br>
<br>
-bool TargetInfo::pointsToLocalDynamicGotEntry(uint32_t Type) const {<br>
- return false;<br>
-}<br>
-<br>
bool TargetInfo::isTlsLocalDynamicRel(uint32_t Type) const { return false; }<br>
<br>
bool TargetInfo::isTlsGlobalDynamicRel(uint32_t Type) const {<br>
@@ -430,10 +424,6 @@ bool X86TargetInfo::isTlsLocalDynamicRel<br>
return Type == R_386_TLS_LDO_32 || Type == R_386_TLS_LDM;<br>
}<br>
<br>
-bool X86TargetInfo::pointsToLocalDynamicGotEntry(uint32_t Type) const {<br>
- return Type == R_386_TLS_LDM;<br>
-}<br>
-<br>
bool X86TargetInfo::isTlsInitialExecRel(uint32_t Type) const {<br>
return Type == R_386_TLS_IE || Type == R_386_TLS_GOTIE;<br>
}<br>
@@ -765,10 +755,6 @@ bool X86_64TargetInfo::isTlsGlobalDynami<br>
return Type == R_X86_64_TLSGD;<br>
}<br>
<br>
-bool X86_64TargetInfo::pointsToLocalDynamicGotEntry(uint32_t Type) const {<br>
- return Type == R_X86_64_TLSLD;<br>
-}<br>
-<br>
bool X86_64TargetInfo::isTlsLocalDynamicRel(uint32_t Type) const {<br>
return Type == R_X86_64_DTPOFF32 || Type == R_X86_64_DTPOFF64 ||<br>
Type == R_X86_64_TLSLD;<br>
<br>
Modified: lld/trunk/ELF/Target.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=266584&r1=266583&r2=266584&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=266584&r1=266583&r2=266584&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Target.h (original)<br>
+++ lld/trunk/ELF/Target.h Sun Apr 17 20:34:20 2016<br>
@@ -25,7 +25,6 @@ class TargetInfo {<br>
public:<br>
uint64_t getVAStart() const;<br>
virtual bool isTlsInitialExecRel(uint32_t Type) const;<br>
- virtual bool pointsToLocalDynamicGotEntry(uint32_t Type) const;<br>
virtual bool isTlsLocalDynamicRel(uint32_t Type) const;<br>
virtual bool isTlsGlobalDynamicRel(uint32_t Type) const;<br>
virtual uint32_t getDynRel(uint32_t Type) const { return Type; }<br>
<br>
Modified: lld/trunk/ELF/Writer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=266584&r1=266583&r2=266584&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=266584&r1=266583&r2=266584&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Writer.cpp (original)<br>
+++ lld/trunk/ELF/Writer.cpp Sun Apr 17 20:34:20 2016<br>
@@ -283,7 +283,7 @@ static unsigned handleTlsRelocation(uint<br>
return 0;<br>
<br>
typedef typename ELFT::uint uintX_t;<br>
- if (Target->pointsToLocalDynamicGotEntry(Type)) {<br>
+ if (Expr == R_TLSLD_PC || Expr == R_TLSLD) {<br>
if (Target->canRelaxTls(Type, nullptr)) {<br>
C.Relocations.push_back(<br>
{R_RELAX_TLS_LD_TO_LE, Type, Offset, Addend, &Body});<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>