[yabridgectl] Don't resolve rvas when parsing

This commit is contained in:
Robbert van der Helm
2022-05-24 04:17:28 +02:00
parent 6818b4fd09
commit 6c1f7bd469
+6 -1
View File
@@ -46,7 +46,12 @@ fn parse_pe32_goblin<P: AsRef<Path>>(binary: P) -> Result<Pe32Info> {
// The original version of this function also supports ELF and Mach architectures, but we don't // The original version of this function also supports ELF and Mach architectures, but we don't
// need those things here // need those things here
let bytes = util::read(&binary)?; let bytes = util::read(&binary)?;
let obj = goblin::pe::PE::parse(&bytes).with_context(|| { let obj = goblin::pe::PE::parse_with_opts(
&bytes,
// We only care about the exports
&goblin::pe::options::ParseOptions { resolve_rva: false },
)
.with_context(|| {
format!( format!(
"Could not parse '{}' as a PE32(+) binary", "Could not parse '{}' as a PE32(+) binary",
binary.as_ref().display() binary.as_ref().display()