[lld] r284751 - [ELF][MIPS] Use getMipsLocalEntriesNum() everywhere we need number of `local` GOT entries. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 10:53:59 PDT 2016
Author: atanasyan
Date: Thu Oct 20 12:53:59 2016
New Revision: 284751
URL: http://llvm.org/viewvc/llvm-project?rev=284751&view=rev
Log:
[ELF][MIPS] Use getMipsLocalEntriesNum() everywhere we need number of `local` GOT entries. NFC
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=284751&r1=284750&r2=284751&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Thu Oct 20 12:53:59 2016
@@ -266,8 +266,7 @@ GotSection<ELFT>::getMipsGotOffset(const
template <class ELFT>
typename GotSection<ELFT>::uintX_t GotSection<ELFT>::getMipsTlsOffset() const {
- return (MipsPageEntries + MipsLocal.size() + MipsGlobal.size()) *
- sizeof(uintX_t);
+ return (getMipsLocalEntriesNum() + MipsGlobal.size()) * sizeof(uintX_t);
}
template <class ELFT>
@@ -306,7 +305,7 @@ template <class ELFT> void GotSection<EL
// in the GOT entry is calculated as (value + 0x8000) & ~0xffff.
MipsPageEntries += (OutSec->getSize() + 0x8000 + 0xfffe) / 0xffff;
}
- EntriesNum += MipsPageEntries + MipsLocal.size() + MipsGlobal.size();
+ EntriesNum += getMipsLocalEntriesNum() + MipsGlobal.size();
}
this->Header.sh_size = EntriesNum * sizeof(uintX_t);
}
More information about the llvm-commits
mailing list