diff --git a/src/symbol_table.rs b/src/symbol_table.rs index 26cabbc..f88dd2a 100644 --- a/src/symbol_table.rs +++ b/src/symbol_table.rs @@ -73,7 +73,7 @@ impl SymbolTable { .map(|sym| { ( symstrtab.get(sym.st_name as usize).unwrap().to_string(), - Symbol::new(&sym, sect_names[sym.st_shndx as usize].to_string()), + Symbol::new(&sym, sect_names.get(sym.st_shndx as usize).map_or_else(|| "UNKNOWN".to_string(), |x| x.to_string())), ) }) .collect::>();