Created
December 19, 2020 09:29
-
-
Save osa1/eef653680d360bfa3202f6ec67fa45cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use goblin::Object; | |
fn main() { | |
let file = std::env::args().nth(1).unwrap(); | |
let contents = std::fs::read(file).unwrap(); | |
let obj = Object::parse(&contents).unwrap(); | |
if let Object::Elf(elf) = obj { | |
for sym in elf.dynsyms.iter() { | |
let sym_name = elf.dynstrtab.get(sym.st_name); | |
println!("{:?} name={:?}", sym, sym_name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment