diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 96505b244f8..08fed9a43ae 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -165,19 +165,19 @@ template <class ELFT> bool GotSection<ELFT>::addTlsIndex() { template <class ELFT> typename GotSection<ELFT>::uintX_t -GotSection<ELFT>::getMipsLocalPageAddr(uintX_t EntryValue) { +GotSection<ELFT>::getMipsLocalPageOffset(uintX_t EntryValue) { // Initialize the entry by the %hi(EntryValue) expression // but without right-shifting. - return getMipsLocalEntryAddr((EntryValue + 0x8000) & ~0xffff); + return getMipsLocalEntryOffset((EntryValue + 0x8000) & ~0xffff); } template <class ELFT> typename GotSection<ELFT>::uintX_t -GotSection<ELFT>::getMipsLocalEntryAddr(uintX_t EntryValue) { +GotSection<ELFT>::getMipsLocalEntryOffset(uintX_t EntryValue) { size_t NewIndex = Target->GotHeaderEntriesNum + MipsLocalGotPos.size(); auto P = MipsLocalGotPos.insert(std::make_pair(EntryValue, NewIndex)); assert(!P.second || MipsLocalGotPos.size() <= MipsLocalEntries); - return this->getVA() + P.first->second * sizeof(uintX_t); + return P.first->second * sizeof(uintX_t) - MipsGPOffset; } template <class ELFT> |

