summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/perk/perk.h4
-rw-r--r--include/perk/perk_structs.h4
-rw-r--r--src/logic/pe_get_image_meta.c4
-rw-r--r--src/reader/pe_read_export_header.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index dfd932f..a6ef8ec 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -102,9 +102,9 @@ struct pe_image_meta {
struct pe_raw_coff_file_hdr * acoff;
union pe_raw_opt_hdr * aopt;
struct pe_raw_sec_hdr * asectbl;
+ struct pe_raw_export_hdr * aedata;
struct pe_meta_export_hdr edata;
- struct pe_export_hdr * aedata;
struct pe_meta_sec_hdr * hedata;
struct pe_meta_import_hdr * idata;
@@ -200,7 +200,7 @@ perk_api int pe_read_dos_header (const struct pe_raw_image_dos_hdr *, struct pe
perk_api int pe_read_coff_header (const struct pe_raw_coff_file_hdr *, struct pe_meta_coff_file_hdr *);
perk_api int pe_read_optional_header (const union pe_raw_opt_hdr *, struct pe_meta_opt_hdr *);
perk_api int pe_read_section_header (const struct pe_raw_sec_hdr *, struct pe_meta_sec_hdr *);
-perk_api int pe_read_export_header (const struct pe_export_hdr *, struct pe_meta_export_hdr *);
+perk_api int pe_read_export_header (const struct pe_raw_export_hdr *, struct pe_meta_export_hdr *);
perk_api int pe_read_import_header (const struct pe_import_hdr *, struct pe_meta_import_hdr *);
perk_api int pe_read_coff_symbol (const struct pe_coff_symbol *, struct pe_meta_coff_symbol *,
diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h
index a8aa069..64c83b0 100644
--- a/include/perk/perk_structs.h
+++ b/include/perk/perk_structs.h
@@ -243,7 +243,7 @@ struct pe_raw_sec_hdr {
};
-struct pe_export_hdr {
+struct pe_raw_export_hdr {
unsigned char export_flags [0x04]; /* 0x00 */
unsigned char time_date_stamp [0x04]; /* 0x04 */
unsigned char major_ver [0x02]; /* 0x08 */
@@ -258,7 +258,7 @@ struct pe_export_hdr {
};
-union pe_export_addr_tbl {
+union pe_raw_export_addr_tbl {
unsigned char export_rva [0x04]; /* 0x00 */
unsigned char forwarder_rva [0x04]; /* 0x00 */
};
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index a0c77f1..a722550 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -229,11 +229,11 @@ int pe_get_image_meta(
if (s >= 0) {
m->hedata = &m->sectbl[s];
- m->aedata = (struct pe_export_hdr *)(base + m->sectbl[s].ptr_to_raw_data
+ m->aedata = (struct pe_raw_export_hdr *)(base + m->sectbl[s].ptr_to_raw_data
+ m->opt.dirs.export_tbl.rva - m->sectbl[s].virtual_addr);
} else if (i >= 0) {
m->hedata = &m->sectbl[i];
- m->aedata = (struct pe_export_hdr *)(base + m->sectbl[i].ptr_to_raw_data);
+ m->aedata = (struct pe_raw_export_hdr *)(base + m->sectbl[i].ptr_to_raw_data);
}
if (m->aedata) {
diff --git a/src/reader/pe_read_export_header.c b/src/reader/pe_read_export_header.c
index a8f454c..47dab66 100644
--- a/src/reader/pe_read_export_header.c
+++ b/src/reader/pe_read_export_header.c
@@ -10,7 +10,7 @@
#include "perk_endian_impl.h"
#include "perk_reader_impl.h"
-int pe_read_export_header(const struct pe_export_hdr * p, struct pe_meta_export_hdr * m)
+int pe_read_export_header(const struct pe_raw_export_hdr * p, struct pe_meta_export_hdr * m)
{
m->export_flags = pe_read_long(p->export_flags);
m->time_date_stamp = pe_read_long(p->time_date_stamp);