mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Add a version of getSymbol with an explicit symbol table. Use it. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -268,7 +268,13 @@ public:
|
||||
const Elf_Ehdr *getHeader() const { return Header; }
|
||||
ErrorOr<const Elf_Shdr *> getSection(const Elf_Sym *symb) const;
|
||||
ErrorOr<const Elf_Shdr *> getSection(uint32_t Index) const;
|
||||
const Elf_Sym *getSymbol(uint32_t index) const;
|
||||
|
||||
const Elf_Sym *getSymbol(const Elf_Shdr *Sec, uint32_t Index) const {
|
||||
return &*(symbol_begin(Sec) + Index);
|
||||
}
|
||||
const Elf_Sym *getSymbol(uint32_t Index) const {
|
||||
return getSymbol(dot_symtab_sec, Index);
|
||||
}
|
||||
|
||||
ErrorOr<StringRef> getSectionName(const Elf_Shdr *Section) const;
|
||||
ErrorOr<ArrayRef<uint8_t> > getSectionContents(const Elf_Shdr *Sec) const;
|
||||
@@ -378,12 +384,6 @@ ELFFile<ELFT>::getSection(const Elf_Sym *symb) const {
|
||||
return getSection(symb->st_shndx);
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
const typename ELFFile<ELFT>::Elf_Sym *
|
||||
ELFFile<ELFT>::getSymbol(uint32_t Index) const {
|
||||
return &*(symbol_begin() + Index);
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
ErrorOr<ArrayRef<uint8_t> >
|
||||
ELFFile<ELFT>::getSectionContents(const Elf_Shdr *Sec) const {
|
||||
|
Reference in New Issue
Block a user