[ELF][MIPS] Use getMipsLocalEntriesNum() everywhere we need number of `local` GOT entries. NFC

llvm-svn: 284751
This commit is contained in:
Simon Atanasyan 2016-10-20 17:53:59 +00:00
parent f4415a3d77
commit badd5b31b7
1 changed files with 2 additions and 3 deletions

View File

@ -266,8 +266,7 @@ GotSection<ELFT>::getMipsGotOffset(const SymbolBody &B, uintX_t Addend) 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<ELFT>::finalize() {
// 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);
}