diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 4d0471a6b49e..7e12dfce9215 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1657,12 +1657,11 @@ template size_t VersionNeedSection::getSize() const { } template -MipsRldMap::MipsRldMap() +MipsRldMapSection::MipsRldMapSection() : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS, sizeof(typename ELFT::uint), ".rld_map") {} -template void MipsRldMap::writeTo(uint8_t *Buf) { - +template void MipsRldMapSection::writeTo(uint8_t *Buf) { // Apply filler from linker script. uint64_t Filler = Script::X->getFiller(this->Name); Filler = (Filler << 32) | Filler; @@ -1779,7 +1778,7 @@ template class elf::VersionDefinitionSection; template class elf::VersionDefinitionSection; template class elf::VersionDefinitionSection; -template class elf::MipsRldMap; -template class elf::MipsRldMap; -template class elf::MipsRldMap; -template class elf::MipsRldMap; +template class elf::MipsRldMapSection; +template class elf::MipsRldMapSection; +template class elf::MipsRldMapSection; +template class elf::MipsRldMapSection; diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 1ce3cb399aa3..a893e9e25903 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -603,9 +603,9 @@ private: // of executable file which is pointed to by the DT_MIPS_RLD_MAP entry. // See "Dynamic section" in Chapter 5 in the following document: // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf -template class MipsRldMap : public SyntheticSection { +template class MipsRldMapSection : public SyntheticSection { public: - MipsRldMap(); + MipsRldMapSection(); size_t getSize() const override { return sizeof(typename ELFT::uint); } void writeTo(uint8_t *Buf) override; }; @@ -629,7 +629,7 @@ template struct In { static GotPltSection *GotPlt; static HashTableSection *HashTab; static InputSection *Interp; - static MipsRldMap *MipsRldMap; + static MipsRldMapSection *MipsRldMap; static PltSection *Plt; static RelocationSection *RelaDyn; static RelocationSection *RelaPlt; @@ -654,7 +654,7 @@ template MipsGotSection *In::MipsGot; template GotPltSection *In::GotPlt; template HashTableSection *In::HashTab; template InputSection *In::Interp; -template MipsRldMap *In::MipsRldMap; +template MipsRldMapSection *In::MipsRldMap; template PltSection *In::Plt; template RelocationSection *In::RelaDyn; template RelocationSection *In::RelaPlt; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index ef629880cabb..2a497cd02ca2 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -298,7 +298,7 @@ template void Writer::createSyntheticSections() { // Add MIPS-specific sections. if (Config->EMachine == EM_MIPS) { if (!Config->Shared && In::DynSymTab) { - In::MipsRldMap = make>(); + In::MipsRldMap = make>(); Symtab::X->Sections.push_back(In::MipsRldMap); } if (auto *Sec = MipsAbiFlagsSection::create())