diff options
Diffstat (limited to 'lld')
4 files changed, 12 insertions, 15 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h index c2ff70ee47b..93319f281f0 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h @@ -47,7 +47,6 @@ protected:  private:    MipsELFWriter<ELFT> _writeHelper; -  MipsLinkingContext &_mipsContext;    MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;  }; @@ -55,7 +54,7 @@ template <class ELFT>  MipsDynamicLibraryWriter<ELFT>::MipsDynamicLibraryWriter(      MipsLinkingContext &ctx, MipsTargetLayout<ELFT> &layout)      : DynamicLibraryWriter<ELFT>(ctx, layout), _writeHelper(ctx, layout), -      _mipsContext(ctx), _mipsTargetLayout(layout) {} +      _mipsTargetLayout(layout) {}  template <class ELFT>  bool MipsDynamicLibraryWriter<ELFT>::createImplicitFiles( @@ -76,7 +75,7 @@ template <class ELFT>  LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)      MipsDynamicLibraryWriter<ELFT>::createSymbolTable() {    return LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)(new ( -      this->_alloc) MipsSymbolTable<ELFT>(_mipsContext)); +      this->_alloc) MipsSymbolTable<ELFT>(this->_context));  }  /// \brief create dynamic table @@ -84,7 +83,7 @@ template <class ELFT>  LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)      MipsDynamicLibraryWriter<ELFT>::createDynamicTable() {    return LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)(new ( -      this->_alloc) MipsDynamicTable<ELFT>(_mipsContext, _mipsTargetLayout)); +      this->_alloc) MipsDynamicTable<ELFT>(this->_context, _mipsTargetLayout));  }  /// \brief create dynamic symbol table @@ -93,7 +92,7 @@ LLD_UNIQUE_BUMP_PTR(DynamicSymbolTable<ELFT>)      MipsDynamicLibraryWriter<ELFT>::createDynamicSymbolTable() {    return LLD_UNIQUE_BUMP_PTR(        DynamicSymbolTable<ELFT>)(new (this->_alloc) MipsDynamicSymbolTable<ELFT>( -      _mipsContext, _mipsTargetLayout)); +      this->_context, _mipsTargetLayout));  }  } // namespace elf diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h index db4f631d54c..2b9562f42b5 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h @@ -15,13 +15,12 @@  namespace lld {  namespace elf { -class MipsLinkingContext;  template <class ELFType> class MipsTargetLayout;  template <class MipsELFType>  class MipsDynamicTable : public DynamicTable<MipsELFType> {  public: -  MipsDynamicTable(MipsLinkingContext &ctx, +  MipsDynamicTable(const ELFLinkingContext &ctx,                     MipsTargetLayout<MipsELFType> &layout)        : DynamicTable<MipsELFType>(ctx, layout, ".dynamic",                                    DefaultLayout<MipsELFType>::ORDER_DYNAMIC), diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h b/lld/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h index dad8c300602..943bbd00afe 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h @@ -41,7 +41,6 @@ protected:  private:    MipsELFWriter<ELFT> _writeHelper; -  MipsLinkingContext &_mipsContext;    MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;  }; @@ -49,7 +48,7 @@ template <class ELFT>  MipsExecutableWriter<ELFT>::MipsExecutableWriter(MipsLinkingContext &ctx,                                                   MipsTargetLayout<ELFT> &layout)      : ExecutableWriter<ELFT>(ctx, layout), _writeHelper(ctx, layout), -      _mipsContext(ctx), _mipsTargetLayout(layout) {} +      _mipsTargetLayout(layout) {}  template <class ELFT>  std::error_code MipsExecutableWriter<ELFT>::setELFHeader() { @@ -57,7 +56,7 @@ std::error_code MipsExecutableWriter<ELFT>::setELFHeader() {    if (ec)      return ec; -  StringRef entryName = _mipsContext.entrySymbolName(); +  StringRef entryName = this->_context.entrySymbolName();    if (const AtomLayout *al = this->_layout.findAtomLayoutByName(entryName)) {      const auto *ea = cast<DefinedAtom>(al->_atom);      if (ea->codeModel() == DefinedAtom::codeMipsMicro || @@ -129,7 +128,7 @@ template <class ELFT>  LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)      MipsExecutableWriter<ELFT>::createSymbolTable() {    return LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)(new ( -      this->_alloc) MipsSymbolTable<ELFT>(_mipsContext)); +      this->_alloc) MipsSymbolTable<ELFT>(this->_context));  }  /// \brief create dynamic table @@ -137,7 +136,7 @@ template <class ELFT>  LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)      MipsExecutableWriter<ELFT>::createDynamicTable() {    return LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)(new ( -      this->_alloc) MipsDynamicTable<ELFT>(_mipsContext, _mipsTargetLayout)); +      this->_alloc) MipsDynamicTable<ELFT>(this->_context, _mipsTargetLayout));  }  /// \brief create dynamic symbol table @@ -146,7 +145,7 @@ LLD_UNIQUE_BUMP_PTR(DynamicSymbolTable<ELFT>)      MipsExecutableWriter<ELFT>::createDynamicSymbolTable() {    return LLD_UNIQUE_BUMP_PTR(        DynamicSymbolTable<ELFT>)(new (this->_alloc) MipsDynamicSymbolTable<ELFT>( -      _mipsContext, _mipsTargetLayout)); +      this->_context, _mipsTargetLayout));  }  } // namespace elf diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h index 1bb96f5ad89..eacc3e783a6 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h @@ -120,7 +120,7 @@ template <class ELFT> class MipsSymbolTable : public SymbolTable<ELFT> {  public:    typedef llvm::object::Elf_Sym_Impl<ELFT> Elf_Sym; -  MipsSymbolTable(const MipsLinkingContext &ctx) +  MipsSymbolTable(const ELFLinkingContext &ctx)        : SymbolTable<ELFT>(ctx, ".symtab",                            DefaultLayout<ELFT>::ORDER_SYMBOL_TABLE) {} @@ -161,7 +161,7 @@ public:  template <class ELFT>  class MipsDynamicSymbolTable : public DynamicSymbolTable<ELFT> {  public: -  MipsDynamicSymbolTable(const MipsLinkingContext &ctx, +  MipsDynamicSymbolTable(const ELFLinkingContext &ctx,                           MipsTargetLayout<ELFT> &layout)        : DynamicSymbolTable<ELFT>(ctx, layout, ".dynsym",                                   DefaultLayout<ELFT>::ORDER_DYNAMIC_SYMBOLS),  | 

