Tweak symbol output entry
This commit is contained in:
@@ -130,7 +130,7 @@ macro_rules! parse_elf {
|
|||||||
let section_start: usize = symtab.start().wrap_err(".symtab")?;
|
let section_start: usize = symtab.start().wrap_err(".symtab")?;
|
||||||
let section_end: usize = symtab.end().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: &[u8; ENTRY_SIZE] = entry.try_into().unwrap();
|
||||||
let entry: &<$elfcfg as ElfConfig>::SymtabEntry = from_bytes(entry);
|
let entry: &<$elfcfg as ElfConfig>::SymtabEntry = from_bytes(entry);
|
||||||
let entry = SymbolTableEntry::from(*entry);
|
let entry = SymbolTableEntry::from(*entry);
|
||||||
@@ -161,11 +161,10 @@ macro_rules! parse_elf {
|
|||||||
.and_then(|v| v.as_str());
|
.and_then(|v| v.as_str());
|
||||||
|
|
||||||
symbols.push(json!({
|
symbols.push(json!({
|
||||||
"i": i,
|
|
||||||
"value": entry.st_value,
|
"value": entry.st_value,
|
||||||
"size": entry.st_size,
|
"size": entry.st_size,
|
||||||
"section": section,
|
"section": section,
|
||||||
"z_name": name,
|
"symbol": name,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user