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 aea97c49ab8..8a7a18ca979 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -81,6 +81,12 @@ getSymVA(const SymbolBody &Body, typename ELFFile<ELFT>::uintX_t &Addend) { llvm_unreachable("invalid symbol kind"); } +template <class ELFT> bool SymbolBody::isGnuIfunc() const { + if (auto *D = dyn_cast<DefinedElf<ELFT>>(this)) + return D->Sym.getType() == STT_GNU_IFUNC; + return false; +} + template <class ELFT> typename ELFFile<ELFT>::uintX_t SymbolBody::getVA(typename ELFFile<ELFT>::uintX_t Addend) const { @@ -245,6 +251,11 @@ std::string elf::demangle(StringRef Name) { #endif } +template bool SymbolBody::template isGnuIfunc<ELF32LE>() const; +template bool SymbolBody::template isGnuIfunc<ELF32BE>() const; +template bool SymbolBody::template isGnuIfunc<ELF64LE>() const; +template bool SymbolBody::template isGnuIfunc<ELF64BE>() const; + template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const; template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const; template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const; |