[lld] r302826 - Reduce template usage. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 14:23:38 PDT 2017
Author: rafael
Date: Thu May 11 16:23:38 2017
New Revision: 302826
URL: http://llvm.org/viewvc/llvm-project?rev=302826&view=rev
Log:
Reduce template usage. NFC.
Modified:
lld/trunk/ELF/Relocations.cpp
lld/trunk/ELF/SyntheticSections.cpp
lld/trunk/ELF/Target.cpp
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=302826&r1=302825&r2=302826&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Thu May 11 16:23:38 2017
@@ -877,8 +877,8 @@ static void scanRelocs(InputSectionBase
addPltEntry(InX::Iplt, In<ELFT>::IgotPlt, In<ELFT>::RelaIplt,
Target->IRelativeRel, Body, true);
else
- addPltEntry(InX::Plt, In<ELFT>::GotPlt, In<ELFT>::RelaPlt,
- Target->PltRel, Body, !Preemptible);
+ addPltEntry(InX::Plt, InX::GotPlt, In<ELFT>::RelaPlt, Target->PltRel,
+ Body, !Preemptible);
}
// Create a GOT slot if a relocation needs GOT.
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=302826&r1=302825&r2=302826&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu May 11 16:23:38 2017
@@ -1093,7 +1093,7 @@ template <class ELFT> void DynamicSectio
add({DT_JMPREL, In<ELFT>::RelaPlt});
add({DT_PLTRELSZ, In<ELFT>::RelaPlt->OutSec->Size});
add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT,
- In<ELFT>::GotPlt});
+ InX::GotPlt});
add({DT_PLTREL, uint64_t(Config->IsRela ? DT_RELA : DT_REL)});
}
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=302826&r1=302825&r2=302826&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Thu May 11 16:23:38 2017
@@ -736,7 +736,7 @@ void X86_64TargetInfo<ELFT>::writePltHea
0x0f, 0x1f, 0x40, 0x00 // nop
};
memcpy(Buf, PltData, sizeof(PltData));
- uint64_t GotPlt = In<ELFT>::GotPlt->getVA();
+ uint64_t GotPlt = InX::GotPlt->getVA();
uint64_t Plt = In<ELFT>::Plt->getVA();
write32le(Buf + 2, GotPlt - Plt + 2); // GOTPLT+8
write32le(Buf + 8, GotPlt - Plt + 4); // GOTPLT+16
@@ -2203,7 +2203,7 @@ void MipsTargetInfo<ELFT>::writePltHeade
write32<E>(Buf + 24, 0x0320f809); // jalr $25
write32<E>(Buf + 28, 0x2718fffe); // subu $24, $24, 2
- uint64_t GotPlt = In<ELFT>::GotPlt->getVA();
+ uint64_t GotPlt = InX::GotPlt->getVA();
writeMipsHi16<E>(Buf, GotPlt);
writeMipsLo16<E>(Buf + 4, GotPlt);
writeMipsLo16<E>(Buf + 8, GotPlt);
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=302826&r1=302825&r2=302826&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu May 11 16:23:38 2017
@@ -408,8 +408,8 @@ template <class ELFT> void Writer<ELFT>:
Add(In<ELFT>::Got);
}
- In<ELFT>::GotPlt = make<GotPltSection>();
- Add(In<ELFT>::GotPlt);
+ InX::GotPlt = make<GotPltSection>();
+ Add(InX::GotPlt);
In<ELFT>::IgotPlt = make<IgotPltSection>();
Add(In<ELFT>::IgotPlt);
@@ -620,7 +620,7 @@ template <class ELFT> bool elf::isRelroS
// by default resolved lazily, so we usually cannot put it into RELRO.
// However, if "-z now" is given, the lazy symbol resolution is
// disabled, which enables us to put it into RELRO.
- if (Sec == In<ELFT>::GotPlt->OutSec)
+ if (Sec == InX::GotPlt->OutSec)
return Config->ZNow;
// .dynamic section contains data for the dynamic linker, and
@@ -1185,7 +1185,7 @@ template <class ELFT> void Writer<ELFT>:
In<ELFT>::GnuHashTab, In<ELFT>::HashTab, In<ELFT>::SymTab,
In<ELFT>::ShStrTab, In<ELFT>::StrTab, In<ELFT>::VerDef,
In<ELFT>::DynStrTab, In<ELFT>::GdbIndex, In<ELFT>::Got,
- In<ELFT>::MipsGot, In<ELFT>::IgotPlt, In<ELFT>::GotPlt,
+ In<ELFT>::MipsGot, In<ELFT>::IgotPlt, InX::GotPlt,
In<ELFT>::RelaDyn, In<ELFT>::RelaIplt, In<ELFT>::RelaPlt,
In<ELFT>::Plt, In<ELFT>::Iplt, In<ELFT>::Plt,
In<ELFT>::EhFrameHdr, In<ELFT>::VerSym, In<ELFT>::VerNeed,
More information about the llvm-commits
mailing list