mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-13 02:21:34 +00:00
Fix PE64 vaddr calculation
This commit is contained in:
parent
f3827ae265
commit
44c58435cd
@ -243,6 +243,11 @@ static RBinInfo* info(RBinFile *arch) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ut64 get_vaddr (RBinFile *arch, ut64 baddr, ut64 paddr, ut64 vaddr) {
|
||||
if (!baddr) return vaddr;
|
||||
return baddr + vaddr;
|
||||
}
|
||||
|
||||
#if !R_BIN_PE64
|
||||
static int check(RBinFile *arch) {
|
||||
int idx, ret = R_FALSE;
|
||||
@ -331,11 +336,6 @@ static RBuffer* create(RBin* bin, const ut8 *code, int codelen, const ut8 *data,
|
||||
return buf;
|
||||
}
|
||||
|
||||
static ut64 get_vaddr (RBinFile *arch, ut64 baddr, ut64 paddr, ut64 vaddr) {
|
||||
if (!baddr) return vaddr;
|
||||
return baddr + vaddr;
|
||||
}
|
||||
|
||||
struct r_bin_plugin_t r_bin_plugin_pe = {
|
||||
.name = "pe",
|
||||
.desc = "PE bin plugin",
|
||||
|
@ -39,6 +39,7 @@ struct r_bin_plugin_t r_bin_plugin_pe64 = {
|
||||
.relocs = &relocs,
|
||||
.meta = NULL,
|
||||
.write = NULL,
|
||||
.get_vaddr = &get_vaddr,
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
|
Loading…
x
Reference in New Issue
Block a user