diff options
Diffstat (limited to 'include/llvm/Object/ELF.h')
-rw-r--r-- | include/llvm/Object/ELF.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 719bc08915..ac6f386032 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -790,6 +790,7 @@ public: uint64_t getNumSections() const; uint64_t getStringTableIndex() const; ELF::Elf64_Word getSymbolTableIndex(const Elf_Sym *symb) const; + const Elf_Ehdr *getElfHeader() const; const Elf_Shdr *getSection(const Elf_Sym *symb) const; const Elf_Shdr *getElfSection(section_iterator &It) const; const Elf_Sym *getElfSymbol(symbol_iterator &It) const; @@ -969,6 +970,12 @@ ELFObjectFile<ELFT>::getSection(const Elf_Sym *symb) const { } template<class ELFT> +const typename ELFObjectFile<ELFT>::Elf_Ehdr * +ELFObjectFile<ELFT>::getElfHeader() const { + return Header; +} + +template<class ELFT> const typename ELFObjectFile<ELFT>::Elf_Shdr * ELFObjectFile<ELFT>::getElfSection(section_iterator &It) const { llvm::object::DataRefImpl ShdrRef = It->getRawDataRefImpl(); |