summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 15:09:44 -0500
committermidipix <writeonce@midipix.org>2016-11-19 15:09:44 -0500
commit50453626fa082d49c5e7cd94d6d90e84fc74f781 (patch)
tree00ddd20b06bb2cd68b5ab2a343ab8a6b623c306c
parent9e3ad969595768bd1a0d4f22dd433ea9e92f0b15 (diff)
downloadpemagine-50453626fa082d49c5e7cd94d6d90e84fc74f781.tar.bz2
pemagine-50453626fa082d49c5e7cd94d6d90e84fc74f781.tar.xz
PE format: struct pe_import_hdr [and friends] --> struct pe_raw_import_hdr.
-rw-r--r--include/pemagine/pe_structs.h6
-rw-r--r--include/pemagine/pemagine.h4
-rw-r--r--src/headers/pe_get_image_special_hdr_addr.c4
-rw-r--r--src/imports/pe_enum_image_import_hdrs.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/include/pemagine/pe_structs.h b/include/pemagine/pe_structs.h
index c99dbd4..db701ab 100644
--- a/include/pemagine/pe_structs.h
+++ b/include/pemagine/pe_structs.h
@@ -264,7 +264,7 @@ union pe_export_addr_tbl {
};
-union pe_import_lookup {
+union pe_raw_import_lookup {
unsigned char import_lookup_entry_64 [0x08]; /* 0x00 */
unsigned char import_lookup_entry_32 [0x04]; /* 0x00 */
unsigned char hint_name_tbl_rva [0x04]; /* 0x00 */
@@ -272,7 +272,7 @@ union pe_import_lookup {
};
-struct pe_import_hdr {
+struct pe_raw_import_hdr {
unsigned char import_lookup_tbl_rva [0x04]; /* 0x00 */
unsigned char time_date_stamp [0x04]; /* 0x04 */
unsigned char forwarder_chain [0x04]; /* 0x08 */
@@ -281,7 +281,7 @@ struct pe_import_hdr {
};
-struct pe_hint_name_entry {
+struct pe_raw_hint_name_entry {
unsigned char hint [0x02]; /* 0x00 */
unsigned char name [0x02]; /* 0x02 */
};
diff --git a/include/pemagine/pemagine.h b/include/pemagine/pemagine.h
index dee22e5..4c1fcf4 100644
--- a/include/pemagine/pemagine.h
+++ b/include/pemagine/pemagine.h
@@ -147,7 +147,7 @@ typedef int pe_enum_image_exports_callback(
typedef int pe_enum_image_import_hdrs_callback(
const void * base,
- struct pe_import_hdr * imp_hdr,
+ struct pe_raw_import_hdr * imp_hdr,
enum pe_callback_reason reason,
void * context);
@@ -159,7 +159,7 @@ pe_api struct pe_raw_data_dirs * pe_get_image_data_dirs_addr (const void * base)
pe_api struct pe_raw_sec_hdr * pe_get_image_section_tbl_addr (const void * base);
pe_api struct pe_raw_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name);
pe_api struct pe_raw_export_hdr * pe_get_image_export_hdr_addr (const void * base, uint32_t * sec_size);
-pe_api struct pe_import_hdr * pe_get_image_import_dir_addr (const void * base, uint32_t * sec_size);
+pe_api struct pe_raw_import_hdr * pe_get_image_import_dir_addr (const void * base, uint32_t * sec_size);
pe_api void * pe_get_image_special_hdr_addr (const void * base, uint32_t ordinal, uint32_t * sec_size);
pe_api void * pe_get_image_entry_point_addr (const void * base);
pe_api int pe_get_image_stack_heap_info (const void * base, struct pe_stack_heap_info *);
diff --git a/src/headers/pe_get_image_special_hdr_addr.c b/src/headers/pe_get_image_special_hdr_addr.c
index dc1e6b0..44caae7 100644
--- a/src/headers/pe_get_image_special_hdr_addr.c
+++ b/src/headers/pe_get_image_special_hdr_addr.c
@@ -43,7 +43,7 @@ struct pe_raw_export_hdr * pe_get_image_export_hdr_addr(const void * base, uint3
}
pe_api
-struct pe_import_hdr * pe_get_image_import_dir_addr(const void * base, uint32_t * sec_size)
+struct pe_raw_import_hdr * pe_get_image_import_dir_addr(const void * base, uint32_t * sec_size)
{
- return (struct pe_import_hdr *)pe_get_image_special_hdr_addr(base,PE_IMAGE_DATA_DIR_ORDINAL_IMPORT,sec_size);
+ return (struct pe_raw_import_hdr *)pe_get_image_special_hdr_addr(base,PE_IMAGE_DATA_DIR_ORDINAL_IMPORT,sec_size);
}
diff --git a/src/imports/pe_enum_image_import_hdrs.c b/src/imports/pe_enum_image_import_hdrs.c
index 0a1a10e..582a8d2 100644
--- a/src/imports/pe_enum_image_import_hdrs.c
+++ b/src/imports/pe_enum_image_import_hdrs.c
@@ -14,7 +14,7 @@ int pe_enum_image_import_hdrs(
pe_enum_image_import_hdrs_callback * callback,
void * ctx)
{
- struct pe_import_hdr * imp_hdr;
+ struct pe_raw_import_hdr*imp_hdr;
int ret;
if (!(imp_hdr = pe_get_image_import_dir_addr(base,0))) {