summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-11-17 11:21:51 -0500
committermidipix <writeonce@midipix.org>2018-11-20 20:25:16 -0500
commitffd8a38d5c3b0e046bc4b5569c9461e390451e6b (patch)
treedca4f02623257504eaf1bf5456e4390f75d17fe8
parent1ce71048e3b47573bc73b8276baca32132e2731f (diff)
downloadperk-ffd8a38d5c3b0e046bc4b5569c9461e390451e6b.tar.bz2
perk-ffd8a38d5c3b0e046bc4b5569c9461e390451e6b.tar.xz
pe_get_image_meta(), struct pe_meta_export_hdr: added .eh_virtual_addr.
-rw-r--r--include/perk/perk_meta.h1
-rw-r--r--src/logic/pe_get_image_meta.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/perk/perk_meta.h b/include/perk/perk_meta.h
index eb05897..375c672 100644
--- a/include/perk/perk_meta.h
+++ b/include/perk/perk_meta.h
@@ -198,6 +198,7 @@ struct pe_meta_sec_hdr {
/* .edata section header*/
struct pe_meta_export_hdr {
+ uint32_t eh_virtual_addr;
uint32_t eh_export_flags;
uint32_t eh_time_date_stamp;
uint16_t eh_major_ver;
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 4943780..38d544a 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -384,9 +384,11 @@ int pe_get_image_meta(
m->h_edata = &m->m_sectbl[s];
m->r_edata = (struct pe_raw_export_hdr *)(base + m->m_sectbl[s].sh_ptr_to_raw_data
+ m->m_opt.oh_dirs.coh_export_tbl.dh_rva - m->m_sectbl[s].sh_virtual_addr);
+ m->m_edata.eh_virtual_addr = m->m_opt.oh_dirs.coh_export_tbl.dh_rva;
} else if (i >= 0) {
m->h_edata = &m->m_sectbl[i];
m->r_edata = (struct pe_raw_export_hdr *)(base + m->m_sectbl[i].sh_ptr_to_raw_data);
+ m->m_edata.eh_virtual_addr = m->m_sectbl[i].sh_virtual_addr;
}
if (m->r_edata) {