LibELF: Use the ELF_STRTAB string constant instead of hard-coding

This commit is contained in:
Andreas Kling 2020-02-21 16:16:23 +01:00
parent 04e40da188
commit 4198061534
Notes: sideshowbarker 2024-07-19 09:11:08 +09:00

View file

@ -147,7 +147,7 @@ bool ELFImage::parse()
m_symbol_table_section_index = i;
}
if (sh.sh_type == SHT_STRTAB && i != header().e_shstrndx) {
if (StringView(".strtab") == section_header_table_string(sh.sh_name))
if (section_header_table_string(sh.sh_name) == ELF_STRTAB)
m_string_table_section_index = i;
}
}