[lld] r287683 - Fix build breakage.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 11:24:52 PST 2016


Author: ruiu
Date: Tue Nov 22 13:24:52 2016
New Revision: 287683

URL: http://llvm.org/viewvc/llvm-project?rev=287683&view=rev
Log:
Fix build breakage.

We cannot have MipsRldMap class and In<ELFT>::MipsRldMap.
Renamed the class.

Modified:
    lld/trunk/ELF/SyntheticSections.cpp
    lld/trunk/ELF/SyntheticSections.h
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=287683&r1=287682&r2=287683&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Nov 22 13:24:52 2016
@@ -1657,12 +1657,11 @@ template <class ELFT> size_t VersionNeed
 }
 
 template <class ELFT>
-MipsRldMap<ELFT>::MipsRldMap()
+MipsRldMapSection<ELFT>::MipsRldMapSection()
     : SyntheticSection<ELFT>(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
                              sizeof(typename ELFT::uint), ".rld_map") {}
 
-template <class ELFT> void MipsRldMap<ELFT>::writeTo(uint8_t *Buf) {
-
+template <class ELFT> void MipsRldMapSection<ELFT>::writeTo(uint8_t *Buf) {
   // Apply filler from linker script.
   uint64_t Filler = Script<ELFT>::X->getFiller(this->Name);
   Filler = (Filler << 32) | Filler;
@@ -1779,7 +1778,7 @@ template class elf::VersionDefinitionSec
 template class elf::VersionDefinitionSection<ELF64LE>;
 template class elf::VersionDefinitionSection<ELF64BE>;
 
-template class elf::MipsRldMap<ELF32LE>;
-template class elf::MipsRldMap<ELF32BE>;
-template class elf::MipsRldMap<ELF64LE>;
-template class elf::MipsRldMap<ELF64BE>;
+template class elf::MipsRldMapSection<ELF32LE>;
+template class elf::MipsRldMapSection<ELF32BE>;
+template class elf::MipsRldMapSection<ELF64LE>;
+template class elf::MipsRldMapSection<ELF64BE>;

Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=287683&r1=287682&r2=287683&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Tue Nov 22 13:24:52 2016
@@ -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 ELFT> class MipsRldMap : public SyntheticSection<ELFT> {
+template <class ELFT> class MipsRldMapSection : public SyntheticSection<ELFT> {
 public:
-  MipsRldMap();
+  MipsRldMapSection();
   size_t getSize() const override { return sizeof(typename ELFT::uint); }
   void writeTo(uint8_t *Buf) override;
 };
@@ -629,7 +629,7 @@ template <class ELFT> struct In {
   static GotPltSection<ELFT> *GotPlt;
   static HashTableSection<ELFT> *HashTab;
   static InputSection<ELFT> *Interp;
-  static MipsRldMap<ELFT> *MipsRldMap;
+  static MipsRldMapSection<ELFT> *MipsRldMap;
   static PltSection<ELFT> *Plt;
   static RelocationSection<ELFT> *RelaDyn;
   static RelocationSection<ELFT> *RelaPlt;
@@ -654,7 +654,7 @@ template <class ELFT> MipsGotSection<ELF
 template <class ELFT> GotPltSection<ELFT> *In<ELFT>::GotPlt;
 template <class ELFT> HashTableSection<ELFT> *In<ELFT>::HashTab;
 template <class ELFT> InputSection<ELFT> *In<ELFT>::Interp;
-template <class ELFT> MipsRldMap<ELFT> *In<ELFT>::MipsRldMap;
+template <class ELFT> MipsRldMapSection<ELFT> *In<ELFT>::MipsRldMap;
 template <class ELFT> PltSection<ELFT> *In<ELFT>::Plt;
 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaDyn;
 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaPlt;

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=287683&r1=287682&r2=287683&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Nov 22 13:24:52 2016
@@ -298,7 +298,7 @@ template <class ELFT> void Writer<ELFT>:
   // Add MIPS-specific sections.
   if (Config->EMachine == EM_MIPS) {
     if (!Config->Shared && In<ELFT>::DynSymTab) {
-      In<ELFT>::MipsRldMap = make<MipsRldMap<ELFT>>();
+      In<ELFT>::MipsRldMap = make<MipsRldMapSection<ELFT>>();
       Symtab<ELFT>::X->Sections.push_back(In<ELFT>::MipsRldMap);
     }
     if (auto *Sec = MipsAbiFlagsSection<ELFT>::create())




More information about the llvm-commits mailing list