forked from OSchip/llvm-project
ELF: Rename isTLS -> isTls for consistency.
llvm-svn: 255855
This commit is contained in:
parent
3554f59f5d
commit
62d0e3297b
|
@ -197,7 +197,7 @@ void InputSectionBase<ELFT>::relocate(uint8_t *Buf, uint8_t *BufEnd,
|
|||
Type = Target->getPltRefReloc(Type);
|
||||
} else if (Target->relocNeedsGot(Type, Body)) {
|
||||
SymVA = Out<ELFT>::Got->getEntryAddr(Body);
|
||||
if (Body.isTLS())
|
||||
if (Body.isTls())
|
||||
Type = Target->getTlsGotReloc();
|
||||
} else if (!Target->relocNeedsCopy(Type, Body) &&
|
||||
isa<SharedSymbol<ELFT>>(Body)) {
|
||||
|
|
|
@ -271,7 +271,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
|
|||
else if (LazyReloc)
|
||||
Reloc = Target->getPltReloc();
|
||||
else if (NeedsGot)
|
||||
Reloc = Body->isTLS() ? Target->getTlsGotReloc() : Target->getGotReloc();
|
||||
Reloc = Body->isTls() ? Target->getTlsGotReloc() : Target->getGotReloc();
|
||||
else if (NeedsCopy)
|
||||
Reloc = Target->getCopyReloc();
|
||||
else
|
||||
|
|
|
@ -173,7 +173,7 @@ template <class ELFT> void SymbolTable<ELFT>::resolve(SymbolBody *New) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (New->isTLS() != Existing->isTLS())
|
||||
if (New->isTls() != Existing->isTls())
|
||||
error("TLS attribute mismatch for symbol: " + conflictMsg(Existing, New));
|
||||
|
||||
// compare() returns -1, 0, or 1 if the lhs symbol is less preferable,
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
bool isUsedInRegularObj() const { return IsUsedInRegularObj; }
|
||||
bool isUsedInDynamicReloc() const { return IsUsedInDynamicReloc; }
|
||||
void setUsedInDynamicReloc() { IsUsedInDynamicReloc = true; }
|
||||
bool isTLS() const { return IsTLS; }
|
||||
bool isTls() const { return IsTLS; }
|
||||
|
||||
// Returns the symbol name.
|
||||
StringRef getName() const { return Name; }
|
||||
|
|
|
@ -335,7 +335,7 @@ bool X86TargetInfo::relocNeedsCopy(uint32_t Type, const SymbolBody &S) const {
|
|||
}
|
||||
|
||||
bool X86TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const {
|
||||
if (S.isTLS() && Type == R_386_TLS_GD)
|
||||
if (S.isTls() && Type == R_386_TLS_GD)
|
||||
return Target->isTlsOptimized(Type, &S) && canBePreempted(&S, true);
|
||||
if (Type == R_386_TLS_GOTIE)
|
||||
return !isTlsOptimized(Type, &S);
|
||||
|
@ -388,7 +388,7 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
|
|||
}
|
||||
|
||||
bool X86TargetInfo::isTlsOptimized(unsigned Type, const SymbolBody *S) const {
|
||||
if (Config->Shared || (S && !S->isTLS()))
|
||||
if (Config->Shared || (S && !S->isTls()))
|
||||
return false;
|
||||
return Type == R_386_TLS_LDO_32 || Type == R_386_TLS_LDM ||
|
||||
Type == R_386_TLS_GD ||
|
||||
|
@ -647,7 +647,7 @@ bool X86_64TargetInfo::isSizeDynReloc(uint32_t Type,
|
|||
|
||||
bool X86_64TargetInfo::isTlsOptimized(unsigned Type,
|
||||
const SymbolBody *S) const {
|
||||
if (Config->Shared || (S && !S->isTLS()))
|
||||
if (Config->Shared || (S && !S->isTls()))
|
||||
return false;
|
||||
return Type == R_X86_64_TLSGD || Type == R_X86_64_TLSLD ||
|
||||
Type == R_X86_64_DTPOFF32 ||
|
||||
|
|
|
@ -224,7 +224,7 @@ void Writer<ELFT>::scanRelocs(
|
|||
if (Body)
|
||||
Body = Body->repl();
|
||||
|
||||
if (Body && Body->isTLS() && Target->isTlsGlobalDynamicReloc(Type)) {
|
||||
if (Body && Body->isTls() && Target->isTlsGlobalDynamicReloc(Type)) {
|
||||
bool Opt = Target->isTlsOptimized(Type, Body);
|
||||
if (!Opt && Out<ELFT>::Got->addDynTlsEntry(Body)) {
|
||||
Out<ELFT>::RelaDyn->addReloc({&C, &RI});
|
||||
|
@ -236,7 +236,7 @@ void Writer<ELFT>::scanRelocs(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (Body && Body->isTLS() && !Target->isTlsDynReloc(Type))
|
||||
if (Body && Body->isTls() && !Target->isTlsDynReloc(Type))
|
||||
continue;
|
||||
|
||||
bool NeedsGot = false;
|
||||
|
|
Loading…
Reference in New Issue