Skip to content

Commit

Permalink
Merge pull request #191 from jarus/support-dynsyms
Browse files Browse the repository at this point in the history
Include symbols from dynsym table of ELF bin/lib
  • Loading branch information
benfred authored Nov 11, 2019
2 parents ade27e6 + 544dad2 commit 7f1405d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/binary_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ pub fn parse_binary(filename: &str, addr: u64, size: u64) -> Result<BinaryInfo,
let name = elf.strtab[sym.st_name].to_string();
symbols.insert(name, sym.st_value + offset);
}
for dynsym in elf.dynsyms.iter() {
let name = elf.dynstrtab[dynsym.st_name].to_string();
symbols.insert(name, dynsym.st_value + offset);
}
Ok(BinaryInfo{filename: filename.to_owned(),
symbols,
bss_addr: bss_header.sh_addr + offset,
Expand Down

0 comments on commit 7f1405d

Please sign in to comment.