Revert r250169: "This patch implements basic variant of lazy loading for x86_x64 and for X86 targets."
With this patch LLD is not able to self-host on x86-64 Linux.
llvm-svn: 250182
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h
index 40bcb9f..a8c597b 100644
--- a/lld/ELF/OutputSections.h
+++ b/lld/ELF/OutputSections.h
@@ -117,23 +117,6 @@
 };
 
 template <class ELFT>
-class GotPltSection final : public OutputSectionBase<ELFT::Is64Bits> {
-  typedef OutputSectionBase<ELFT::Is64Bits> Base;
-  typedef typename Base::uintX_t uintX_t;
-
-public:
-  GotPltSection();
-  void finalize() override;
-  void writeTo(uint8_t *Buf) override;
-  void addEntry(SymbolBody *Sym);
-  bool empty() const;
-  uintX_t getEntryAddr(const SymbolBody &B) const;
-
-private:
-  std::vector<const SymbolBody *> Entries;
-};
-
-template <class ELFT>
 class PltSection final : public OutputSectionBase<ELFT::Is64Bits> {
   typedef OutputSectionBase<ELFT::Is64Bits> Base;
   typedef typename Base::uintX_t uintX_t;
@@ -189,7 +172,7 @@
   typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
 
 public:
-  RelocationSection(StringRef Name, bool IsRela);
+  RelocationSection(bool IsRela);
   void addReloc(const DynamicReloc<ELFT> &Reloc) { Relocs.push_back(Reloc); }
   void finalize() override;
   void writeTo(uint8_t *Buf) override;
@@ -301,7 +284,6 @@
 // until Writer is initialized.
 template <class ELFT> struct Out {
   static DynamicSection<ELFT> *Dynamic;
-  static GotPltSection<ELFT> *GotPlt;
   static GotSection<ELFT> *Got;
   static HashTableSection<ELFT> *HashTab;
   static InterpSection<ELFT::Is64Bits> *Interp;
@@ -310,7 +292,6 @@
   static uint8_t *OpdBuf;
   static PltSection<ELFT> *Plt;
   static RelocationSection<ELFT> *RelaDyn;
-  static RelocationSection<ELFT> *RelaPlt;
   static StringTableSection<ELFT::Is64Bits> *DynStrTab;
   static StringTableSection<ELFT::Is64Bits> *StrTab;
   static SymbolTableSection<ELFT> *DynSymTab;
@@ -318,7 +299,6 @@
 };
 
 template <class ELFT> DynamicSection<ELFT> *Out<ELFT>::Dynamic;
-template <class ELFT> GotPltSection<ELFT> *Out<ELFT>::GotPlt;
 template <class ELFT> GotSection<ELFT> *Out<ELFT>::Got;
 template <class ELFT> HashTableSection<ELFT> *Out<ELFT>::HashTab;
 template <class ELFT> InterpSection<ELFT::Is64Bits> *Out<ELFT>::Interp;
@@ -327,7 +307,6 @@
 template <class ELFT> uint8_t *Out<ELFT>::OpdBuf;
 template <class ELFT> PltSection<ELFT> *Out<ELFT>::Plt;
 template <class ELFT> RelocationSection<ELFT> *Out<ELFT>::RelaDyn;
-template <class ELFT> RelocationSection<ELFT> *Out<ELFT>::RelaPlt;
 template <class ELFT> StringTableSection<ELFT::Is64Bits> *Out<ELFT>::DynStrTab;
 template <class ELFT> StringTableSection<ELFT::Is64Bits> *Out<ELFT>::StrTab;
 template <class ELFT> SymbolTableSection<ELFT> *Out<ELFT>::DynSymTab;