Don't try to load string table if strtab_link is SHN_UNDEF or the symbol table is empty
This commit is contained in:
parent
18046688f6
commit
73ee7aa3a1
@ -91,7 +91,11 @@ namespace detail {
|
|||||||
std::string elf::lookup_symbol(frame_ptr pc) {
|
std::string elf::lookup_symbol(frame_ptr pc) {
|
||||||
// TODO: Also search the SHT_DYNSYM at some point, maybe
|
// TODO: Also search the SHT_DYNSYM at some point, maybe
|
||||||
auto symtab_ = get_symtab();
|
auto symtab_ = get_symtab();
|
||||||
if(symtab_.is_error()) {
|
if(
|
||||||
|
symtab_.is_error()
|
||||||
|
|| symtab_.unwrap_value().strtab_link == SHN_UNDEF
|
||||||
|
|| symtab_.unwrap_value().entries.empty()
|
||||||
|
) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
auto& symtab = symtab_.unwrap_value();
|
auto& symtab = symtab_.unwrap_value();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user