mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-15 23:40:54 +00:00
We already have the sections, pass them to getSHNDXTable.
llvm-svn: 285897
This commit is contained in:
parent
2227c7f425
commit
84d6a17134
@ -318,7 +318,7 @@ void elf::ObjectFile<ELFT>::initializeSections(
|
||||
this->Symtab = &Sec;
|
||||
break;
|
||||
case SHT_SYMTAB_SHNDX:
|
||||
this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec));
|
||||
this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec, ObjSections));
|
||||
break;
|
||||
case SHT_STRTAB:
|
||||
case SHT_NULL:
|
||||
@ -575,7 +575,8 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
|
||||
const Elf_Shdr *DynamicSec = nullptr;
|
||||
|
||||
const ELFFile<ELFT> Obj = this->ELFObj;
|
||||
for (const Elf_Shdr &Sec : check(Obj.sections())) {
|
||||
ArrayRef<Elf_Shdr> Sections = check(Obj.sections());
|
||||
for (const Elf_Shdr &Sec : Sections) {
|
||||
switch (Sec.sh_type) {
|
||||
default:
|
||||
continue;
|
||||
@ -586,7 +587,7 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
|
||||
DynamicSec = &Sec;
|
||||
break;
|
||||
case SHT_SYMTAB_SHNDX:
|
||||
this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec));
|
||||
this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec, Sections));
|
||||
break;
|
||||
case SHT_GNU_versym:
|
||||
this->VersymSec = &Sec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user