summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-05-11 21:23:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-05-11 21:23:38 +0000
commit4b1c3696e3ac8935742659eb2c518efdac02eedf (patch)
tree304138cdd5e1a56591fb1ca555eb28755d24b387
parent74df05471ecca697e0da9c4d788339a6697740fa (diff)
downloadbcm5719-llvm-4b1c3696e3ac8935742659eb2c518efdac02eedf.tar.gz
bcm5719-llvm-4b1c3696e3ac8935742659eb2c518efdac02eedf.zip
Reduce template usage. NFC.
llvm-svn: 302826
-rw-r--r--lld/ELF/Relocations.cpp4
-rw-r--r--lld/ELF/SyntheticSections.cpp2
-rw-r--r--lld/ELF/Target.cpp4
-rw-r--r--lld/ELF/Writer.cpp8
4 files changed, 9 insertions, 9 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index f5db931e975..0570ed08631 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -877,8 +877,8 @@ static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) {
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.
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index b023aa84cb5..6d6d22fb66d 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1093,7 +1093,7 @@ template <class ELFT> void DynamicSection<ELFT>::finalizeContents() {
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)});
}
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 5c71aeec6cd..7a70bb9e877 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -736,7 +736,7 @@ void X86_64TargetInfo<ELFT>::writePltHeader(uint8_t *Buf) const {
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>::writePltHeader(uint8_t *Buf) const {
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);
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index e31f64ea905..5be4eb2c5f2 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -408,8 +408,8 @@ template <class ELFT> void Writer<ELFT>::createSyntheticSections() {
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::isRelroSection(const OutputSection *Sec) {
// 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>::finalizeSections() {
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,
OpenPOWER on IntegriCloud