parent
74df05471e
commit
4b1c3696e3
|
@ -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.
|
||||
|
|
|
@ -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)});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue