Tweak symbol output entry

This commit is contained in:
2024-02-10 17:11:30 +01:00
parent ff9bda49c2
commit fc63fca366

View File

@@ -130,7 +130,7 @@ macro_rules! parse_elf {
let section_start: usize = symtab.start().wrap_err(".symtab")?;
let section_end: usize = symtab.end().wrap_err(".symtab")?;
for (i, entry) in elf[section_start..section_end].chunks_exact(ENTRY_SIZE).enumerate() {
for entry in elf[section_start..section_end].chunks_exact(ENTRY_SIZE) {
let entry: &[u8; ENTRY_SIZE] = entry.try_into().unwrap();
let entry: &<$elfcfg as ElfConfig>::SymtabEntry = from_bytes(entry);
let entry = SymbolTableEntry::from(*entry);
@@ -161,11 +161,10 @@ macro_rules! parse_elf {
.and_then(|v| v.as_str());
symbols.push(json!({
"i": i,
"value": entry.st_value,
"size": entry.st_size,
"section": section,
"z_name": name,
"symbol": name,
}));
}