13 #ifndef LLVM_OBJECT_ELFOBJECTFILE_H 14 #define LLVM_OBJECT_ELFOBJECTFILE_H 39 #include <system_error> 109 return getObject()->getSectionType(getRawDataRefImpl());
113 return getObject()->getSectionFlags(getRawDataRefImpl());
117 return getObject()->getSectionOffset(getRawDataRefImpl());
124 assert(isa<ELFObjectFileBase>(B->getObject()));
147 return getObject()->getSymbolSize(getRawDataRefImpl());
151 return getObject()->getSymbolBinding(getRawDataRefImpl());
155 return getObject()->getSymbolOther(getRawDataRefImpl());
159 return getObject()->getSymbolELFType(getRawDataRefImpl());
164 for (
auto &EE : ElfSymbolTypes) {
165 if (EE.Value == Type) {
199 return getObject()->getRelocationAddend(getRawDataRefImpl());
325 if (!SectionsOrErr) {
330 uintptr_t SHT =
reinterpret_cast<uintptr_t
>((*SectionsOrErr).begin());
331 unsigned SymTableIndex =
332 (
reinterpret_cast<uintptr_t
>(SymTable) - SHT) /
sizeof(
Elf_Shdr);
334 DRI.
d.
a = SymTableIndex;
340 return reinterpret_cast<const Elf_Shdr *
>(Sec.
p);
345 DRI.
p =
reinterpret_cast<uintptr_t
>(Sec);
351 DRI.
p =
reinterpret_cast<uintptr_t
>(Dyn);
356 unsigned char Binding = ESym->getBinding();
357 unsigned char Visibility = ESym->getVisibility();
371 return SectionsOrErr.takeError();
373 for (
const Elf_Shdr &Sec : *SectionsOrErr) {
376 if (!ErrorOrContents)
377 return ErrorOrContents.takeError();
379 auto Contents = ErrorOrContents.get();
403 auto Ret = EF.template getEntry<Elf_Sym>(Sym.
d.
a, Sym.
d.
b);
410 return reinterpret_cast<const Elf_Shdr *
>(Sec.
p);
449 template <
class ELFT>
454 template <
class ELFT>
456 const Elf_Sym *ESym = getSymbol(Sym);
457 auto SymTabOrErr = EF.getSection(Sym.
d.
a);
459 return SymTabOrErr.takeError();
460 const Elf_Shdr *SymTableSec = *SymTabOrErr;
461 auto StrTabOrErr = EF.getSection(SymTableSec->sh_link);
463 return StrTabOrErr.takeError();
464 const Elf_Shdr *StringTableSec = *StrTabOrErr;
465 auto SymStrTabOrErr = EF.getStringTable(StringTableSec);
467 return SymStrTabOrErr.takeError();
469 if (Name && !Name->empty())
476 return (*SecOrErr)->getName();
482 template <
class ELFT>
487 template <
class ELFT>
492 template <
class ELFT>
497 template <
class ELFT>
499 const Elf_Sym *ESym = getSymbol(Symb);
500 uint64_t
Ret = ESym->st_value;
504 const Elf_Ehdr *Header = EF.getHeader();
513 template <
class ELFT>
517 const Elf_Sym *ESym = getSymbol(Symb);
518 switch (ESym->st_shndx) {
525 const Elf_Ehdr *Header = EF.getHeader();
526 auto SymTabOrErr = EF.getSection(Symb.
d.
a);
528 return SymTabOrErr.takeError();
529 const Elf_Shdr *SymTab = *SymTabOrErr;
532 auto SectionOrErr = EF.getSection(ESym, SymTab, ShndxTable);
534 return SectionOrErr.takeError();
537 Result += Section->sh_addr;
543 template <
class ELFT>
545 const Elf_Sym *Sym = getSymbol(Symb);
547 return Sym->st_value;
551 template <
class ELFT>
553 return EF.getHeader()->e_machine;
557 return EF.getHeader()->e_type;
560 template <
class ELFT>
562 return getSymbol(Sym)->st_size;
565 template <
class ELFT>
567 return getSymbol(Symb)->st_size;
570 template <
class ELFT>
572 return getSymbol(Symb)->getBinding();
575 template <
class ELFT>
577 return getSymbol(Symb)->st_other;
580 template <
class ELFT>
582 return getSymbol(Symb)->getType();
585 template <
class ELFT>
588 const Elf_Sym *ESym = getSymbol(Symb);
590 switch (ESym->getType()) {
608 template <
class ELFT>
610 const Elf_Sym *ESym = getSymbol(Sym);
626 auto DotSymtabSecSyms = EF.symbols(DotSymtabSec);
627 if (DotSymtabSecSyms && ESym == (*DotSymtabSecSyms).begin())
629 auto DotDynSymSecSyms = EF.symbols(DotDynSymSec);
630 if (DotDynSymSecSyms && ESym == (*DotDynSymSecSyms).begin())
643 if (ESym->getType() ==
ELF::STT_FUNC && (ESym->st_value & 1) == 1)
653 if (isExportedToOtherDSO(ESym))
662 template <
class ELFT>
666 auto ESecOrErr = EF.getSection(ESym, SymTab, ShndxTable);
668 return ESecOrErr.takeError();
675 Sec.
p =
reinterpret_cast<intptr_t>(ESec);
679 template <
class ELFT>
682 const Elf_Sym *Sym = getSymbol(Symb);
683 auto SymTabOrErr = EF.getSection(Symb.
d.
a);
685 return SymTabOrErr.takeError();
686 const Elf_Shdr *SymTab = *SymTabOrErr;
690 template <
class ELFT>
696 template <
class ELFT>
701 template <
class ELFT>
706 template <
class ELFT>
708 auto SectionsOrErr = EF.sections();
713 const Elf_Shdr *First = SectionsOrErr->begin();
717 template <
class ELFT>
722 template <
class ELFT>
728 if (std::error_code EC =
730 (uintptr_t)
base() + EShdr->sh_offset, EShdr->sh_size))
736 template <
class ELFT>
741 template <
class ELFT>
746 template <
class ELFT>
751 template <
class ELFT>
759 template <
class ELFT>
766 template <
class ELFT>
767 std::vector<SectionRef>
769 std::vector<SectionRef> Res;
770 std::vector<uintptr_t>
Offsets;
772 auto SectionsOrErr = EF.sections();
776 for (
const Elf_Shdr &Sec : *SectionsOrErr) {
780 reinterpret_cast<Elf_Dyn *
>((uintptr_t)
base() + Sec.sh_offset);
781 for (; Dynamic->d_tag != ELF::DT_NULL; Dynamic++) {
782 if (Dynamic->d_tag == ELF::DT_REL || Dynamic->d_tag == ELF::DT_RELA ||
783 Dynamic->d_tag == ELF::DT_JMPREL) {
784 Offsets.push_back(Dynamic->d_un.d_val);
788 for (
const Elf_Shdr &Sec : *SectionsOrErr) {
790 Res.emplace_back(toDRI(&Sec),
this);
795 template <
class ELFT>
800 template <
class ELFT>
807 template <
class ELFT>
814 template <
class ELFT>
818 auto SectionsOrErr = EF.sections();
821 uintptr_t SHT =
reinterpret_cast<uintptr_t
>((*SectionsOrErr).begin());
822 RelData.
d.
a = (Sec.
p - SHT) / EF.getHeader()->e_shentsize;
827 template <
class ELFT>
835 const Elf_Shdr *RelSec = getRelSection(RelData);
838 auto SymSecOrErr = EF.getSection(RelSec->sh_link);
842 RelData.
d.
b += S->sh_size / S->sh_entsize;
846 template <
class ELFT>
864 template <
class ELFT>
869 template <
class ELFT>
873 const Elf_Shdr *sec = getRelSection(Rel);
875 symbolIdx = getRel(Rel)->getSymbol(EF.isMips64EL());
877 symbolIdx = getRela(Rel)->getSymbol(EF.isMips64EL());
883 SymbolData.
d.
a = sec->sh_link;
884 SymbolData.
d.
b = symbolIdx;
888 template <
class ELFT>
890 const Elf_Shdr *sec = getRelSection(Rel);
892 return getRel(Rel)->r_offset;
894 return getRela(Rel)->r_offset;
897 template <
class ELFT>
899 const Elf_Shdr *sec = getRelSection(Rel);
901 return getRel(Rel)->getType(EF.isMips64EL());
903 return getRela(Rel)->getType(EF.isMips64EL());
906 template <
class ELFT>
911 template <
class ELFT>
915 EF.getRelocationTypeName(type, Result);
918 template <
class ELFT>
923 return (int64_t)getRela(Rel)->r_addend;
926 template <
class ELFT>
930 auto Ret = EF.template getEntry<Elf_Rel>(Rel.
d.
a, Rel.
d.
b);
936 template <
class ELFT>
940 auto Ret = EF.template getEntry<Elf_Rela>(Rela.
d.
a, Rela.
d.
b);
946 template <
class ELFT>
950 if (
Error E = EFOrErr.takeError())
952 auto EF = std::move(*EFOrErr);
954 auto SectionsOrErr = EF.sections();
956 return SectionsOrErr.takeError();
958 const Elf_Shdr *DotDynSymSec =
nullptr;
959 const Elf_Shdr *DotSymtabSec =
nullptr;
961 for (
const Elf_Shdr &Sec : *SectionsOrErr) {
962 switch (Sec.sh_type) {
974 auto TableOrErr = EF.getSHNDXTable(Sec);
976 return TableOrErr.takeError();
977 ShndxTable = *TableOrErr;
986 template <
class ELFT>
994 EF(EF), DotDynSymSec(DotDynSymSec), DotSymtabSec(DotSymtabSec),
995 ShndxTable(ShndxTable) {}
997 template <
class ELFT>
1002 template <
class ELFT>
1006 DotSymtabSec && DotSymtabSec->sh_size >=
sizeof(
Elf_Sym) ? 1 : 0);
1010 template <
class ELFT>
1019 template <
class ELFT>
1025 template <
class ELFT>
1034 template <
class ELFT>
1036 auto SectionsOrErr = EF.
sections();
1042 template <
class ELFT>
1044 auto SectionsOrErr = EF.
sections();
1050 template <
class ELFT>
1052 return ELFT::Is64Bits ? 8 : 4;
1055 template <
class ELFT>
1062 return "ELF32-i386";
1064 return "ELF32-iamcu";
1066 return "ELF32-x86-64";
1068 return (IsLittleEndian ?
"ELF32-arm-little" :
"ELF32-arm-big");
1072 return "ELF32-hexagon";
1074 return "ELF32-lanai";
1076 return "ELF32-mips";
1078 return "ELF32-msp430";
1082 return "ELF32-riscv";
1085 return "ELF32-sparc";
1087 return "ELF32-amdgpu";
1089 return "ELF32-unknown";
1094 return "ELF64-i386";
1096 return "ELF64-x86-64";
1098 return (IsLittleEndian ?
"ELF64-aarch64-little" :
"ELF64-aarch64-big");
1100 return "ELF64-ppc64";
1102 return "ELF64-riscv";
1104 return "ELF64-s390";
1106 return "ELF64-sparc";
1108 return "ELF64-mips";
1110 return "ELF64-amdgpu";
1114 return "ELF64-unknown";
1174 if (!IsLittleEndian)
1196 template <
class ELFT>
1201 template <
class ELFT>
1214 #endif // LLVM_OBJECT_ELFOBJECTFILE_H
const content_type & operator*() const
void getRelocationTypeName(DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
uint64_t getSectionSize(DataRefImpl Sec) const override
virtual uint16_t getEMachine() const =0
static bool classof(const Binary *v)
Expected< uint64_t > getStartAddress() const override
virtual bool isBerkeleyData(DataRefImpl Sec) const
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
static Expected< ELFFile > create(StringRef Object)
SubtargetFeatures getFeatures() const override
const Elf_Shdr * toELFShdrIter(DataRefImpl Sec) const
std::vector< SectionRef > dynamic_relocation_sections() const override
bool isSectionBSS(DataRefImpl Sec) const override
bool isSectionText(DataRefImpl Sec) const override
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
uint8_t getBinding() const
virtual Expected< section_iterator > getRelocatedSection(DataRefImpl Sec) const
elf_relocation_iterator(const relocation_iterator &B)
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
const ELFObjectFileBase * getObject() const
void moveSymbolNext(DataRefImpl &Symb) const override
static std::error_code checkOffset(MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)
Optional< std::vector< StOtherPiece > > Other
bool isRelocatableObject() const override
True if this is a relocatable object (.o/.obj).
Expected< StringRef > getSymbolName(DataRefImpl Symb) const override
virtual bool isSectionBSS(DataRefImpl Sec) const =0
This class is the base class for all object file types.
elf_symbol_iterator_range symbols() const
virtual Expected< ArrayRef< uint8_t > > getSectionContents(DataRefImpl Sec) const =0
typename ELFT::Rel Elf_Rel
virtual uint64_t getRelocationOffset(DataRefImpl Rel) const =0
const uint8_t * base() const
Error takeError()
Take ownership of the stored error.
const ObjectFile * getObject() const
virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const
Base class for error info classes.
bool isSectionVirtual(DataRefImpl Sec) const override
virtual Expected< StringRef > getSymbolName(DataRefImpl Symb) const =0
uint32_t getSectionType(DataRefImpl Sec) const override
virtual Expected< int64_t > getRelocationAddend(DataRefImpl Rel) const =0
void moveRelocationNext(DataRefImpl &Rel) const override
virtual relocation_iterator section_rel_end(DataRefImpl Sec) const =0
basic_symbol_iterator symbol_begin() const override
symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override
virtual basic_symbol_iterator symbol_begin() const =0
Expected< const Elf_Shdr * > getSection(const Elf_Sym *Sym, const Elf_Shdr *SymTab, ArrayRef< Elf_Word > ShndxTable) const
void setARMSubArch(Triple &TheTriple) const override
uint8_t getSymbolOther(DataRefImpl Symb) const override
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
const Elf_Shdr * DotSymtabSec
uint64_t getSectionAlignment(DataRefImpl Sec) const override
Expected< Elf_Shdr_Range > sections() const
StringRef getBuffer() const
This is a value type class that represents a single relocation in the list of relocations in the obje...
static Expected< const T * > getObject(MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
Expected< section_iterator > getSymbolSection(const Elf_Sym *Symb, const Elf_Shdr *SymTab) const
elf_section_iterator(const section_iterator &B)
typename ELFT::Ehdr Elf_Ehdr
virtual uint64_t getSectionIndex(DataRefImpl Sec) const =0
const ELFObjectFileBase * getObject() const
Tagged union holding either a T or a Error.
Expected< ArrayRef< uint8_t > > getSectionContents(const Elf_Shdr *Sec) const
Expected< StringRef > getSectionName(DataRefImpl Sec) const override
Expected< const typename ELFT::Shdr * > getSection(typename ELFT::ShdrRange Sections, uint32_t Index)
virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const =0
content_iterator< SectionRef > section_iterator
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override
const Elf_Shdr * getRelSection(DataRefImpl Rel) const
Get the relocation section that contains Rel.
const ObjectFile * getObject() const
static Error createError(const Twine &Err)
uint8_t getBytesInAddress() const override
The number of bytes used to represent an address in this object file format.
DataRefImpl toDRI(const Elf_Shdr *SymTable, unsigned SymbolNum) const
virtual Error getBuildAttributes(ARMAttributeParser &Attributes) const =0
virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const =0
section_iterator section_begin() const override
MemoryBufferRef getMemoryBufferRef() const
void moveSectionNext(DataRefImpl &Sec) const override
elf_symbol_iterator_range getDynamicSymbolIterators() const override
virtual uint64_t getSectionAlignment(DataRefImpl Sec) const =0
virtual Expected< uint64_t > getStartAddress() const
const llvm::EnumEntry< unsigned > ElfSymbolTypes[NumElfSymbolTypes]
DataRefImpl toDRI(const Elf_Dyn *Dyn) const
constexpr int NumElfSymbolTypes
ArrayRef< Elf_Word > ShndxTable
const ObjectFile * getObject() const
virtual uint64_t getSectionOffset(DataRefImpl Sec) const =0
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type cast(const Y &Val)
elf_symbol_iterator dynamic_symbol_begin() const
relocation_iterator section_rel_end(DataRefImpl Sec) const override
typename ELFT::Shdr Elf_Shdr
struct llvm::object::DataRefImpl::@292 d
Expected< int64_t > getRelocationAddend(DataRefImpl Rel) const override
std::vector< std::pair< DataRefImpl, uint64_t > > getPltAddresses() const
const content_type * operator->() const
unsigned getPlatformFlags() const override
Returns platform-specific object flags, if any.
const Elf_Shdr * getSection(DataRefImpl Sec) const
virtual Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const =0
virtual uint32_t getSymbolFlags(DataRefImpl Symb) const =0
uint8_t getSymbolBinding(DataRefImpl Symb) const override
const Elf_Sym * getSymbol(DataRefImpl Sym) const
ELFRelocationRef(const RelocationRef &B)
uint64_t getFlags() const
static bool classof(const Binary *v)
const ELFObjectFileBase * getObject() const
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
const Elf_Rela * getRela(DataRefImpl Rela) const
virtual uint8_t getBytesInAddress() const =0
The number of bytes used to represent an address in this object file format.
virtual void moveRelocationNext(DataRefImpl &Rel) const =0
The instances of the Type class are immutable: once they are created, they are never changed...
unsigned int getType() const
uint32_t getSymbolFlags(DataRefImpl Symb) const override
virtual uint64_t getSectionFlags(DataRefImpl Sec) const =0
iterator_range< elf_symbol_iterator > elf_symbol_iterator_range
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
typename ELFT::Sym Elf_Sym
const Elf_Shdr * DotDynSymSec
Expected< int64_t > getAddend() const
static unsigned int getELFType(bool isLE, bool is64Bits)
const Elf_Rel * getRel(DataRefImpl Rel) const
virtual std::vector< SectionRef > dynamic_relocation_sections() const
uint32_t getSymbolAlignment(DataRefImpl Symb) const override
bool isSectionData(DataRefImpl Sec) const override
typename ELFT::Dyn Elf_Dyn
virtual Expected< StringRef > getSectionName(DataRefImpl Sec) const =0
virtual basic_symbol_iterator symbol_end() const =0
static Expected< ELFObjectFile< ELFT > > create(MemoryBufferRef Object)
StringRef getELFTypeName() const
bool isExportedToOtherDSO(const Elf_Sym *ESym) const
uint8_t getSymbolELFType(DataRefImpl Symb) const override
uint64_t getSectionIndex(DataRefImpl Sec) const override
StringRef getFileFormatName() const override
const ELFSymbolRef & operator*() const
void consumeError(Error Err)
Consume a Error without doing anything.
const ELFSectionRef & operator*() const
DataRefImpl toDRI(const Elf_Shdr *Sec) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const ELFSectionRef * operator->() const
ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
Triple - Helper class for working with autoconf configuration names.
uint64_t getSectionAddress(DataRefImpl Sec) const override
uint64_t getRelocationOffset(DataRefImpl Rel) const override
bool isBerkeleyText(DataRefImpl Sec) const override
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type)
typename ELFT::Rela Elf_Rela
void handleAllErrors(Error E, HandlerTs &&... Handlers)
Behaves the same as handleErrors, except that by contract all errors must be handled by the given han...
virtual Expected< uint64_t > getSymbolAddress(DataRefImpl Symb) const =0
static ErrorSuccess success()
Create a success value.
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override
friend class RelocationRef
Expected< section_iterator > getRelocatedSection(DataRefImpl Sec) const override
const ELFFile< ELFT > * getELFFile() const
virtual section_iterator section_begin() const =0
const SymbolicFile * getObject() const
const SymbolRef & operator*() const
virtual uint64_t getSectionAddress(DataRefImpl Sec) const =0
virtual Triple::ArchType getArch() const =0
uint64_t getSymbolValue(DataRefImpl Symb) const
virtual unsigned getPlatformFlags() const =0
Returns platform-specific object flags, if any.
virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const =0
uint64_t getSectionFlags(DataRefImpl Sec) const override
Expected< uint64_t > getSymbolAddress(DataRefImpl Symb) const override
Triple::ArchType getArch() const override
content_iterator< BasicSymbolRef > basic_symbol_iterator
elf_symbol_iterator dynamic_symbol_end() const
A range adaptor for a pair of iterators.
Manages the enabling and disabling of subtarget specific features.
bool isBerkeleyData(DataRefImpl Sec) const override
uint64_t getOffset() const
virtual bool isSectionText(DataRefImpl Sec) const =0
virtual uint64_t getSymbolSize(DataRefImpl Symb) const =0
SubtargetFeatures getMIPSFeatures() const
This is a value type class that represents a single symbol in the list of symbols in the object file...
relocation_iterator section_rel_begin(DataRefImpl Sec) const override
Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const override
uint8_t getELFType() const
virtual void moveSectionNext(DataRefImpl &Sec) const =0
Error getBuildAttributes(ARMAttributeParser &Attributes) const override
virtual section_iterator section_end() const =0
virtual bool isBerkeleyText(DataRefImpl Sec) const
basic_symbol_iterator symbol_end() const override
virtual uint16_t getEType() const =0
bool isSectionCompressed(DataRefImpl Sec) const override
virtual bool isSectionData(DataRefImpl Sec) const =0
ELFSectionRef(const SectionRef &B)
Expected< ArrayRef< uint8_t > > getSectionContents(DataRefImpl Sec) const override
const ELFSymbolRef * operator->() const
uint64_t getSectionOffset(DataRefImpl Sec) const override
virtual uint32_t getSectionType(DataRefImpl Sec) const =0
virtual void moveSymbolNext(DataRefImpl &Symb) const =0
virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const =0
virtual bool isRelocatableObject() const =0
True if this is a relocatable object (.o/.obj).
section_iterator section_end() const override
virtual uint8_t getSymbolBinding(DataRefImpl Symb) const =0
const SymbolRef * operator->() const
virtual bool isSectionCompressed(DataRefImpl Sec) const =0
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual Expected< section_iterator > getSymbolSection(DataRefImpl Symb) const =0
virtual elf_symbol_iterator_range getDynamicSymbolIterators() const =0
virtual bool isSectionVirtual(DataRefImpl Sec) const =0
void Parse(ArrayRef< uint8_t > Section, bool isLittle)
virtual uint64_t getSectionSize(DataRefImpl Sec) const =0
Lightweight error class with error context and mandatory checking.
virtual void getRelocationTypeName(DataRefImpl Rel, SmallVectorImpl< char > &Result) const =0
const ELFRelocationRef & operator*() const
content_iterator< RelocationRef > relocation_iterator
SubtargetFeatures getARMFeatures() const
uint64_t getRelocationType(DataRefImpl Rel) const override
#define LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)
StringRef - Represent a constant reference to a string, i.e.
virtual uint8_t getSymbolELFType(DataRefImpl Symb) const =0
SubtargetFeatures getRISCVFeatures() const
const Elf_Ehdr * getHeader() const
virtual uint8_t getSymbolOther(DataRefImpl Symb) const =0
const ELFRelocationRef * operator->() const
elf_symbol_iterator(const basic_symbol_iterator &B)
virtual StringRef getFileFormatName() const =0
virtual uint64_t getRelocationType(DataRefImpl Rel) const =0
std::error_code errorToErrorCode(Error Err)
Helper for converting an ECError to a std::error_code.
typename ELFT::uint uintX_t
This is a value type class that represents a single section in the list of sections in the object fil...
ELFSymbolRef(const SymbolRef &B)
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.