mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-01 13:20:25 +00:00
Use the getSectionIndex from llvm.
llvm-svn: 285918
This commit is contained in:
parent
a455864fdf
commit
73aba6229f
@ -142,12 +142,7 @@ typename ELFT::SymRange ELFFileBase<ELFT>::getElfSymbols(bool OnlyGlobals) {
|
||||
|
||||
template <class ELFT>
|
||||
uint32_t ELFFileBase<ELFT>::getSectionIndex(const Elf_Sym &Sym) const {
|
||||
uint32_t I = Sym.st_shndx;
|
||||
if (I == ELF::SHN_XINDEX)
|
||||
return check(ELFObj.getExtendedSymbolTableIndex(&Sym, Symtab, SymtabSHNDX));
|
||||
if (I >= ELF::SHN_LORESERVE)
|
||||
return 0;
|
||||
return I;
|
||||
return check(ELFObj.getSectionIndex(&Sym, Symtab, SymtabSHNDX));
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
|
Loading…
Reference in New Issue
Block a user