diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-08-01 14:53:49 +0000 | 
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-08-01 14:53:49 +0000 | 
| commit | 7a400d9af4f28b6f7d3a494abd3fadeb36461020 (patch) | |
| tree | 71c59ebdd91da9d7075a2d7c50d6508acbfa2029 /lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h | |
| parent | 3644ee4aa84cce46ebd9320e3f7bb37ae1c82f10 (diff) | |
| download | bcm5719-llvm-7a400d9af4f28b6f7d3a494abd3fadeb36461020.tar.gz bcm5719-llvm-7a400d9af4f28b6f7d3a494abd3fadeb36461020.zip | |
[Mips] Implement definition of the DT_MIPS_RLD_MAP_REL dynamic tag
llvm-svn: 243835
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h index 83633c92699..480c69cf460 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h @@ -31,8 +31,10 @@ public:      this->addEntry(DT_MIPS_RLD_VERSION, 1);      // The .rld_map section address. -    if (this->_ctx.isDynamic() && this->_ctx.getOutputELFType() == ET_EXEC) +    if (this->_ctx.getOutputELFType() == ET_EXEC) {        _dt_rldmap = this->addEntry(DT_MIPS_RLD_MAP, 0); +      _dt_rldmaprel = this->addEntry(DT_MIPS_RLD_MAP_REL, 0); +    }      // MIPS flags.      this->addEntry(DT_MIPS_FLAGS, RHF_NOTPOT); @@ -83,8 +85,13 @@ public:      if (const auto *sec = _targetLayout.findOutputSection(".MIPS.options"))        this->_entries[_dt_options].d_un.d_ptr = sec->virtualAddr(); -    if (const auto *sec = _targetLayout.findOutputSection(".rld_map")) +    if (const auto *sec = _targetLayout.findOutputSection(".rld_map")) {        this->_entries[_dt_rldmap].d_un.d_ptr = sec->virtualAddr(); +      this->_entries[_dt_rldmaprel].d_un.d_ptr = +          sec->virtualAddr() - +          (this->virtualAddr() + +           _dt_rldmaprel * sizeof(typename DynamicTable<ELFT>::Elf_Dyn)); +    }    }    int64_t getGotPltTag() override { return DT_MIPS_PLTGOT; } @@ -107,6 +114,7 @@ private:    std::size_t _dt_baseaddr;    std::size_t _dt_options;    std::size_t _dt_rldmap; +  std::size_t _dt_rldmaprel;    MipsTargetLayout<ELFT> &_targetLayout;  }; | 

