LLVM API Documentation
#include <ELF.h>
Definition at line 52 of file Object/ELF.h.
typedef Elf_Dyn_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Dyn |
Definition at line 127 of file Object/ELF.h.
typedef ELFEntityIterator<const Elf_Dyn> llvm::object::ELFFile< ELFT >::Elf_Dyn_Iter |
Definition at line 136 of file Object/ELF.h.
typedef iterator_range<Elf_Dyn_Iter> llvm::object::ELFFile< ELFT >::Elf_Dyn_Range |
Definition at line 137 of file Object/ELF.h.
typedef Elf_Ehdr_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Ehdr |
Definition at line 124 of file Object/ELF.h.
typedef Elf_Phdr_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Phdr |
Definition at line 128 of file Object/ELF.h.
typedef ELFEntityIterator<const Elf_Phdr> llvm::object::ELFFile< ELFT >::Elf_Phdr_Iter |
Iterate over program header table.
Definition at line 388 of file Object/ELF.h.
typedef Elf_Rel_Impl<ELFT, false> llvm::object::ELFFile< ELFT >::Elf_Rel |
Definition at line 129 of file Object/ELF.h.
typedef ELFEntityIterator<const Elf_Rel> llvm::object::ELFFile< ELFT >::Elf_Rel_Iter |
Definition at line 139 of file Object/ELF.h.
typedef Elf_Rel_Impl<ELFT, true> llvm::object::ELFFile< ELFT >::Elf_Rela |
Definition at line 130 of file Object/ELF.h.
typedef ELFEntityIterator<const Elf_Rela> llvm::object::ELFFile< ELFT >::Elf_Rela_Iter |
Definition at line 138 of file Object/ELF.h.
typedef Elf_Shdr_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Shdr |
Definition at line 125 of file Object/ELF.h.
typedef ELFEntityIterator<const Elf_Shdr> llvm::object::ELFFile< ELFT >::Elf_Shdr_Iter |
Definition at line 140 of file Object/ELF.h.
typedef iterator_range<Elf_Shdr_Iter> llvm::object::ELFFile< ELFT >::Elf_Shdr_Range |
Definition at line 141 of file Object/ELF.h.
typedef Elf_Sym_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Sym |
Definition at line 126 of file Object/ELF.h.
typedef Elf_Verdaux_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Verdaux |
Definition at line 132 of file Object/ELF.h.
typedef Elf_Verdef_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Verdef |
Definition at line 131 of file Object/ELF.h.
typedef Elf_Vernaux_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Vernaux |
Definition at line 134 of file Object/ELF.h.
typedef Elf_Verneed_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Verneed |
Definition at line 133 of file Object/ELF.h.
typedef Elf_Versym_Impl<ELFT> llvm::object::ELFFile< ELFT >::Elf_Versym |
Definition at line 135 of file Object/ELF.h.
typedef std::conditional<ELFT::Is64Bits, uint64_t, uint32_t>::type llvm::object::ELFFile< ELFT >::uintX_t |
Definition at line 56 of file Object/ELF.h.
llvm::object::ELFFile< ELFT >::ELFFile | ( | StringRef | Object, |
std::error_code & | ec | ||
) |
Definition at line 625 of file Object/ELF.h.
References llvm::object::ELFFile< ELFT >::begin_program_headers(), llvm::object::ELFFile< ELFT >::begin_symbols(), llvm::object::Elf_Ehdr_Impl< ELFT >::e_shentsize, llvm::object::Elf_Ehdr_Impl< ELFT >::e_shoff, llvm::object::ELFFile< ELFT >::end_program_headers(), llvm::object::ELFFile< ELFT >::end_symbols(), llvm::object::ELFFile< ELFT >::getNumSections(), llvm::object::ELFFile< ELFT >::getSection(), llvm::object::ELFFile< ELFT >::getStringTableIndex(), llvm::ELF::PT_DYNAMIC, llvm::report_fatal_error(), llvm::object::ELFFile< ELFT >::sections(), llvm::ELF::SHN_UNDEF, llvm::ELF::SHT_DYNAMIC, llvm::ELF::SHT_DYNSYM, llvm::ELF::SHT_GNU_verdef, llvm::ELF::SHT_GNU_verneed, llvm::ELF::SHT_GNU_versym, llvm::ELF::SHT_SYMTAB, llvm::ELF::SHT_SYMTAB_SHNDX, llvm::StringRef::size(), and llvm::object::ELFFile< ELFT >::VerifyStrTab().
Elf_Sym_Iter llvm::object::ELFFile< ELFT >::begin_dynamic_symbols | ( | ) | const [inline] |
Definition at line 351 of file Object/ELF.h.
ELFFile< ELFT >::Elf_Dyn_Iter llvm::object::ELFFile< ELFT >::begin_dynamic_table | ( | ) | const |
Definition at line 795 of file Object/ELF.h.
Referenced by llvm::object::ELFFile< ELFT >::dynamic_table().
Elf_Phdr_Iter llvm::object::ELFFile< ELFT >::begin_program_headers | ( | ) | const [inline] |
Definition at line 390 of file Object/ELF.h.
References llvm::object::Elf_Ehdr_Impl< ELFT >::e_phentsize, and llvm::object::Elf_Ehdr_Impl< ELFT >::e_phoff.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
Elf_Rel_Iter llvm::object::ELFFile< ELFT >::begin_rel | ( | const Elf_Shdr * | sec | ) | const [inline] |
Definition at line 377 of file Object/ELF.h.
Elf_Rela_Iter llvm::object::ELFFile< ELFT >::begin_rela | ( | const Elf_Shdr * | sec | ) | const [inline] |
Definition at line 366 of file Object/ELF.h.
ELFFile< ELFT >::Elf_Shdr_Iter llvm::object::ELFFile< ELFT >::begin_sections | ( | ) | const |
Definition at line 763 of file Object/ELF.h.
Referenced by llvm::object::ELFFile< ELFT >::sections().
ELFFile< ELFT >::Elf_Sym_Iter llvm::object::ELFFile< ELFT >::begin_symbols | ( | ) | const |
Definition at line 776 of file Object/ELF.h.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
Elf_Dyn_Range llvm::object::ELFFile< ELFT >::dynamic_table | ( | bool | NULLEnd = false | ) | const [inline] |
Definition at line 347 of file Object/ELF.h.
References llvm::object::ELFFile< ELFT >::begin_dynamic_table(), llvm::object::ELFFile< ELFT >::end_dynamic_table(), and llvm::make_range().
Elf_Sym_Iter llvm::object::ELFFile< ELFT >::end_dynamic_symbols | ( | ) | const [inline] |
Definition at line 358 of file Object/ELF.h.
ELFFile< ELFT >::Elf_Dyn_Iter llvm::object::ELFFile< ELFT >::end_dynamic_table | ( | bool | NULLEnd = false | ) | const |
NULLEnd | use one past the first DT_NULL entry as the end instead of the section size. |
Definition at line 804 of file Object/ELF.h.
References llvm::ELF::DT_NULL, and llvm::MipsISD::Ret.
Referenced by llvm::object::ELFFile< ELFT >::dynamic_table().
Elf_Phdr_Iter llvm::object::ELFFile< ELFT >::end_program_headers | ( | ) | const [inline] |
Definition at line 395 of file Object/ELF.h.
References llvm::object::Elf_Ehdr_Impl< ELFT >::e_phentsize, llvm::object::Elf_Ehdr_Impl< ELFT >::e_phnum, and llvm::object::Elf_Ehdr_Impl< ELFT >::e_phoff.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
Elf_Rel_Iter llvm::object::ELFFile< ELFT >::end_rel | ( | const Elf_Shdr * | sec | ) | const [inline] |
Definition at line 382 of file Object/ELF.h.
Elf_Rela_Iter llvm::object::ELFFile< ELFT >::end_rela | ( | const Elf_Shdr * | sec | ) | const [inline] |
Definition at line 371 of file Object/ELF.h.
ELFFile< ELFT >::Elf_Shdr_Iter llvm::object::ELFFile< ELFT >::end_sections | ( | ) | const |
Definition at line 769 of file Object/ELF.h.
Referenced by llvm::object::ELFFile< ELFT >::sections().
ELFFile< ELFT >::Elf_Sym_Iter llvm::object::ELFFile< ELFT >::end_symbols | ( | ) | const |
Definition at line 784 of file Object/ELF.h.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
const char * llvm::object::ELFFile< ELFT >::getDynamicString | ( | uintX_t | Offset | ) | const |
Definition at line 882 of file Object/ELF.h.
const T * llvm::object::ELFFile< ELFT >::getEntry | ( | uint32_t | Section, |
uint32_t | Entry | ||
) | const |
Definition at line 839 of file Object/ELF.h.
const T * llvm::object::ELFFile< ELFT >::getEntry | ( | const Elf_Shdr * | Section, |
uint32_t | Entry | ||
) | const |
Definition at line 845 of file Object/ELF.h.
const Elf_Ehdr* llvm::object::ELFFile< ELFT >::getHeader | ( | ) | const [inline] |
Definition at line 405 of file Object/ELF.h.
StringRef llvm::object::ELFFile< ELFT >::getLoadName | ( | ) | const |
Definition at line 824 of file Object/ELF.h.
References llvm::ELF::DT_SONAME.
uint64_t llvm::object::ELFFile< ELFT >::getNumSections | ( | ) | const |
Definition at line 604 of file Object/ELF.h.
References llvm::ELF::SHN_UNDEF.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
std::pair< const typename ELFFile< ELFT >::Elf_Shdr *, const typename ELFFile< ELFT >::Elf_Sym * > llvm::object::ELFFile< ELFT >::getRelocationSymbol | ( | const Elf_Shdr * | RelSec, |
const RelT * | Rel | ||
) | const |
Get the symbol table section and symbol for a given relocation.
Definition at line 586 of file Object/ELF.h.
StringRef llvm::object::ELFFile< ELFT >::getRelocationTypeName | ( | uint32_t | Type | ) | const |
Definition at line 547 of file Object/ELF.h.
References llvm::object::getELFRelocationTypeName().
void llvm::object::ELFFile< ELFT >::getRelocationTypeName | ( | uint32_t | Type, |
SmallVectorImpl< char > & | Result | ||
) | const |
Definition at line 552 of file Object/ELF.h.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::StringRef::end(), and Name.
const ELFFile< ELFT >::Elf_Shdr * llvm::object::ELFFile< ELFT >::getSection | ( | const Elf_Sym * | symb | ) | const |
Definition at line 523 of file Object/ELF.h.
References llvm::ELF::SHN_LORESERVE, and llvm::ELF::SHN_XINDEX.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
const ELFFile< ELFT >::Elf_Shdr * llvm::object::ELFFile< ELFT >::getSection | ( | uint32_t | Index | ) | const |
Definition at line 853 of file Object/ELF.h.
References llvm::report_fatal_error().
ErrorOr< ArrayRef< uint8_t > > llvm::object::ELFFile< ELFT >::getSectionContents | ( | const Elf_Shdr * | Sec | ) | const |
Definition at line 539 of file Object/ELF.h.
References llvm::makeArrayRef(), and llvm::object::parse_failed.
ErrorOr< StringRef > llvm::object::ELFFile< ELFT >::getSectionName | ( | const Elf_Shdr * | Section | ) | const |
Definition at line 915 of file Object/ELF.h.
References llvm::object::parse_failed.
const char * llvm::object::ELFFile< ELFT >::getString | ( | uint32_t | section, |
uint32_t | offset | ||
) | const |
Definition at line 866 of file Object/ELF.h.
const char * llvm::object::ELFFile< ELFT >::getString | ( | const Elf_Shdr * | section, |
uint32_t | offset | ||
) | const |
Definition at line 872 of file Object/ELF.h.
References llvm::report_fatal_error(), and llvm::ELF::SHT_STRTAB.
ELFFile< ELFT >::uintX_t llvm::object::ELFFile< ELFT >::getStringTableIndex | ( | ) | const |
Definition at line 614 of file Object/ELF.h.
References llvm::ELF::SHN_HIRESERVE, and llvm::ELF::SHN_UNDEF.
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
const ELFFile< ELFT >::Elf_Sym * llvm::object::ELFFile< ELFT >::getSymbol | ( | uint32_t | index | ) | const |
Definition at line 533 of file Object/ELF.h.
uint64_t llvm::object::ELFFile< ELFT >::getSymbolIndex | ( | const Elf_Sym * | sym | ) | const |
Definition at line 752 of file Object/ELF.h.
ErrorOr< StringRef > llvm::object::ELFFile< ELFT >::getSymbolName | ( | Elf_Sym_Iter | Sym | ) | const |
Definition at line 889 of file Object/ELF.h.
References llvm::object::ELFFile< ELFT >::Elf_Sym_Iter::isDynamic(), and llvm::object::parse_failed.
ErrorOr< StringRef > llvm::object::ELFFile< ELFT >::getSymbolName | ( | const Elf_Shdr * | SymTab, |
const Elf_Sym * | Symb | ||
) | const |
Get the name of Symb
.
SymTab | The symbol table section Symb is contained in. |
Symb | The symbol to get the name of. |
SymTab
is used to lookup the string table to use to get the symbol's name.
Definition at line 899 of file Object/ELF.h.
References llvm::object::parse_failed.
ELF::Elf64_Word llvm::object::ELFFile< ELFT >::getSymbolTableIndex | ( | const Elf_Sym * | symb | ) | const |
Definition at line 515 of file Object/ELF.h.
References llvm::ELF::SHN_XINDEX.
ErrorOr< StringRef > llvm::object::ELFFile< ELFT >::getSymbolVersion | ( | const Elf_Shdr * | section, |
const Elf_Sym * | Symb, | ||
bool & | IsDefault | ||
) | const |
Definition at line 922 of file Object/ELF.h.
References llvm::StringRef::find(), Name, llvm::StringRef::npos, llvm::object::parse_failed, llvm::StringRef::size(), llvm::StringRef::substr(), llvm::ELF::VER_NDX_GLOBAL, llvm::ELF::VER_NDX_LOCAL, llvm::ELF::VERSYM_HIDDEN, llvm::ELF::VERSYM_VERSION, and llvm::object::Elf_Versym_Impl< ELFT >::vs_index.
bool llvm::object::ELFFile< ELFT >::isMips64EL | ( | ) | const [inline] |
bool llvm::object::ELFFile< ELFT >::isMipsELF64 | ( | ) | const [inline] |
Definition at line 323 of file Object/ELF.h.
References llvm::object::Elf_Ehdr_Impl< ELFT >::e_machine, llvm::ELF::ELFCLASS64, llvm::ELF::EM_MIPS, and llvm::object::Elf_Ehdr_Impl< ELFT >::getFileClass().
Elf_Shdr_Range llvm::object::ELFFile< ELFT >::sections | ( | ) | const [inline] |
Definition at line 336 of file Object/ELF.h.
References llvm::object::ELFFile< ELFT >::begin_sections(), llvm::object::ELFFile< ELFT >::end_sections(), and llvm::make_range().
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().
void llvm::object::ELFFile< ELFT >::VerifyStrTab | ( | const Elf_Shdr * | sh | ) | const |
Definition at line 596 of file Object/ELF.h.
References llvm::report_fatal_error().
Referenced by llvm::object::ELFFile< ELFT >::ELFFile().