diff options
Diffstat (limited to 'lld/ELF/Symbols.cpp')
-rw-r--r-- | lld/ELF/Symbols.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index 5f7d95381b4..2ff2edf6740 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -138,6 +138,11 @@ uint64_t Symbol::getGotPltOffset() const { return (PltIndex + Target->GotPltHeaderEntriesNum) * Target->GotPltEntrySize; } +uint64_t Symbol::getPPC64LongBranchOffset() const { + assert(PPC64BranchltIndex != 0xffff); + return PPC64BranchltIndex * Target->GotPltEntrySize; +} + uint64_t Symbol::getPltVA() const { if (this->IsInIplt) return In.Iplt->getVA() + PltIndex * Target->PltEntrySize; @@ -149,6 +154,12 @@ uint64_t Symbol::getPltOffset() const { return Target->getPltEntryOffset(PltIndex); } +uint64_t Symbol::getPPC64LongBranchTableVA() const { + assert(PPC64BranchltIndex != 0xffff); + return In.PPC64LongBranchTarget->getVA() + + PPC64BranchltIndex * Target->GotPltEntrySize; +} + uint64_t Symbol::getSize() const { if (const auto *DR = dyn_cast<Defined>(this)) return DR->Size; |