return makeArrayRef(program_header_begin(), program_header_end());
}
- ErrorOr<StringRef> getSectionStringTable() const;
ErrorOr<StringRef> getSectionStringTable(Elf_Shdr_Range Sections) const;
uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym,
const Elf_Shdr *SymTab,
return getEntry<Elf_Sym>(SymTab, Index);
}
-template <class ELFT>
-ErrorOr<StringRef> ELFFile<ELFT>::getSectionStringTable() const {
- auto SectionsOrErr = sections();
- if (std::error_code EC = SectionsOrErr.getError())
- return EC;
- return getSectionStringTable(*SectionsOrErr);
-}
-
template <class ELFT>
ErrorOr<StringRef>
ELFFile<ELFT>::getSectionStringTable(Elf_Shdr_Range Sections) const {
template <class ELFT>
ErrorOr<StringRef>
ELFFile<ELFT>::getSectionName(const Elf_Shdr *Section) const {
- ErrorOr<StringRef> Table = getSectionStringTable();
+ auto SectionsOrErr = sections();
+ if (std::error_code EC = SectionsOrErr.getError())
+ return EC;
+ ErrorOr<StringRef> Table = getSectionStringTable(*SectionsOrErr);
if (std::error_code EC = Table.getError())
return EC;
return getSectionName(Section, *Table);