diff options
Diffstat (limited to 'lld/ELF/Symbols.cpp')
-rw-r--r-- | lld/ELF/Symbols.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 443bec0c111f..f3bd67b85873 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -59,6 +59,7 @@ DenseMap<const Symbol *, std::pair<const InputFile *, const InputFile *>> elf::backwardReferences; SmallVector<std::tuple<std::string, const InputFile *, const Symbol &>, 0> elf::whyExtract; +SmallVector<SymbolAux, 0> elf::symAux; static uint64_t getSymVA(const Symbol &sym, int64_t addend) { switch (sym.kind()) { @@ -153,7 +154,7 @@ uint64_t Symbol::getGotVA() const { } uint64_t Symbol::getGotOffset() const { - return gotIndex * target->gotEntrySize; + return getGotIdx() * target->gotEntrySize; } uint64_t Symbol::getGotPltVA() const { @@ -164,15 +165,15 @@ uint64_t Symbol::getGotPltVA() const { uint64_t Symbol::getGotPltOffset() const { if (isInIplt) - return pltIndex * target->gotEntrySize; - return (pltIndex + target->gotPltHeaderEntriesNum) * target->gotEntrySize; + return getPltIdx() * target->gotEntrySize; + return (getPltIdx() + target->gotPltHeaderEntriesNum) * target->gotEntrySize; } uint64_t Symbol::getPltVA() const { uint64_t outVA = isInIplt - ? in.iplt->getVA() + pltIndex * target->ipltEntrySize + ? in.iplt->getVA() + getPltIdx() * target->ipltEntrySize : in.plt->getVA() + in.plt->headerSize + - pltIndex * target->pltEntrySize; + getPltIdx() * target->pltEntrySize; // While linking microMIPS code PLT code are always microMIPS // code. Set the less-significant bit to track that fact. |