}
template <class ELFT>
-ErrorOr<const typename ELFFile<ELFT>::Elf_Shdr *>
+ErrorOr<const typename ELFT::Shdr *>
ELFFile<ELFT>::getSection(const Elf_Sym *Sym, const Elf_Shdr *SymTab,
ArrayRef<Elf_Word> ShndxTable) const {
uint32_t Index = Sym->st_shndx;
}
template <class ELFT>
-const typename ELFFile<ELFT>::Elf_Sym *
+const typename ELFT::Sym *
ELFFile<ELFT>::getRelocationSymbol(const Elf_Rel *Rel,
const Elf_Shdr *SymTab) const {
uint32_t Index = Rel->getSymbol(isMips64EL());
}
template <class ELFT>
-ErrorOr<const typename ELFFile<ELFT>::Elf_Shdr *>
+ErrorOr<const typename ELFT::Shdr *>
ELFFile<ELFT>::getSection(uint32_t Index) const {
auto TableOrErr = sections();
if (std::error_code EC = TableOrErr.getError())
}
template <class ELFT>
-ErrorOr<ArrayRef<typename ELFFile<ELFT>::Elf_Word>>
+ErrorOr<ArrayRef<typename ELFT::Word>>
ELFFile<ELFT>::getSHNDXTable(const Elf_Shdr &Section) const {
assert(Section.sh_type == ELF::SHT_SYMTAB_SHNDX);
auto VOrErr = getSectionContentsAsArray<Elf_Word>(&Section);
};
// I really don't like doing this, but the alternative is copypasta.
-#define LLVM_ELF_IMPORT_TYPES(E, W) \
- typedef typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Addr Elf_Addr; \
- typedef typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Off Elf_Off; \
- typedef typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Half Elf_Half; \
- typedef typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Word Elf_Word; \
- typedef \
- typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Sword Elf_Sword; \
- typedef \
- typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Xword Elf_Xword; \
- typedef \
- typename ELFDataTypeTypedefHelper<ELFType<E, W>>::Elf_Sxword Elf_Sxword;
#define LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) \
- LLVM_ELF_IMPORT_TYPES(ELFT::TargetEndianness, ELFT::Is64Bits)
+ typedef typename ELFT::Addr Elf_Addr; \
+ typedef typename ELFT::Off Elf_Off; \
+ typedef typename ELFT::Half Elf_Half; \
+ typedef typename ELFT::Word Elf_Word; \
+ typedef typename ELFT::Sword Elf_Sword; \
+ typedef typename ELFT::Xword Elf_Xword; \
+ typedef typename ELFT::Sxword Elf_Sxword;
+
+#define LLD_ELF_COMMA ,
+#define LLVM_ELF_IMPORT_TYPES(E, W) \
+ LLVM_ELF_IMPORT_TYPES_ELFT(ELFType<E LLD_ELF_COMMA W>)
// Section header.
template <class ELFT> struct Elf_Shdr_Base;