summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2016-10-20 17:53:59 +0000
committerSimon Atanasyan <simon@atanasyan.com>2016-10-20 17:53:59 +0000
commitbadd5b31b733febc58644d3fdbb23d1b448aeadb (patch)
tree3c910c0615c5065251c1eed863eff5f29e4f5a5c /lld/ELF/OutputSections.cpp
parentf4415a3d77058f2714b2110276a8f40f77cca12d (diff)
downloadbcm5719-llvm-badd5b31b733febc58644d3fdbb23d1b448aeadb.tar.gz
bcm5719-llvm-badd5b31b733febc58644d3fdbb23d1b448aeadb.zip
[ELF][MIPS] Use getMipsLocalEntriesNum() everywhere we need number of `local` GOT entries. NFC
llvm-svn: 284751
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 91b89aa715c..e9546f43380 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -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);
}
OpenPOWER on IntegriCloud