[hsa-runtime] Modify elfsection checks in amd_elf_image class
Modified If condition checks in GElfImage::pullElf() of amd_elf_image.cpp to check using section types instead of a string check. Change-Id: I1ab92f0a9118fb2382652a1cc900a3150cbee2da
This commit is contained in:
@@ -1433,9 +1433,9 @@ namespace elf {
|
||||
for (size_t i = 1; i < sections.size(); ++i) {
|
||||
if (i == ehdr.e_shstrndx || i == ehdr.e_shstrndx) { continue; }
|
||||
std::unique_ptr<GElfSection>& section = sections[i];
|
||||
if (section->Name() == ".strtab") { strtabSection = static_cast<GElfStringTable*>(section.get()); }
|
||||
if (section->Name() == ".symtab") { symtabSection = static_cast<GElfSymbolTable*>(section.get()); }
|
||||
if (section->Name() == ".note") { noteSection = static_cast<GElfNoteSection*>(section.get()); }
|
||||
if (section->type() == SHT_STRTAB) { strtabSection = static_cast<GElfStringTable*>(section.get()); }
|
||||
if (section->type() == SHT_SYMTAB) { symtabSection = static_cast<GElfSymbolTable*>(section.get()); }
|
||||
if (section->type() == SHT_NOTE) { noteSection = static_cast<GElfNoteSection*>(section.get()); }
|
||||
}
|
||||
|
||||
size_t phnum;
|
||||
|
||||
Reference in New Issue
Block a user