Delete isTlsDynRel.
It was a badly specified hack for when a tls relocation should be
propagated to the dynamic relocation table.
This replaces it with a not as bad hack of saying that a local dynamic
tls relocation is never preempted.
I will try to remove even that second hack in the next patch.
llvm-svn: 262955
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 9e0ecd9..e4e876f 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -271,7 +271,7 @@
}
uintX_t SymVA = Body->getVA<ELFT>();
- bool CBP = canBePreempted(Body);
+ bool CBP = canBePreempted(Body, Type);
if (Target->needsPlt<ELFT>(Type, *Body)) {
SymVA = Body->getPltVA<ELFT>();
} else if (Target->needsGot(Type, *Body)) {
@@ -284,11 +284,6 @@
SymVA = Body->getGotVA<ELFT>();
if (Body->IsTls)
Type = Target->getTlsGotRel(Type);
- } else if (!Target->needsCopyRel<ELFT>(Type, *Body) &&
- isa<SharedSymbol<ELFT>>(*Body)) {
- continue;
- } else if (Target->isTlsDynRel(Type, *Body)) {
- continue;
} else if (Target->isSizeRel(Type) && CBP) {
// A SIZE relocation is supposed to set a symbol size, but if a symbol
// can be preempted, the size at runtime may be different than link time.
@@ -302,6 +297,8 @@
SymVA = getMipsGpAddr<ELFT>() - AddrLoc + 4;
else if (Body == Config->MipsLocalGp)
SymVA = getMipsGpAddr<ELFT>();
+ } else if (!Target->needsCopyRel<ELFT>(Type, *Body) && CBP) {
+ continue;
}
uintX_t Size = Body->getSize<ELFT>();
Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc, SymVA + A, Size + A,