summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 14:46:50 -0500
committermidipix <writeonce@midipix.org>2016-11-19 14:46:50 -0500
commit945985cb313ada34d002423fbedfdebebcd22edc (patch)
tree73c61539e02a74921607c1caef8e83ce74b4b26f
parentde5b3010350adbf3c5b9ceb12ddc0a2658a0f5ac (diff)
downloadpemagine-945985cb313ada34d002423fbedfdebebcd22edc.tar.bz2
pemagine-945985cb313ada34d002423fbedfdebebcd22edc.tar.xz
PE format: struct pe_coff_file_hdr --> struct pe_raw_coff_file_hdr.
-rw-r--r--include/pemagine/pe_structs.h2
-rw-r--r--include/pemagine/pemagine.h2
-rw-r--r--src/headers/pe_get_image_coff_hdr_addr.c6
-rw-r--r--src/headers/pe_get_image_opt_hdr_addr.c2
-rw-r--r--src/headers/pe_get_image_section_tbl_addr.c4
5 files changed, 8 insertions, 8 deletions
diff --git a/include/pemagine/pe_structs.h b/include/pemagine/pe_structs.h
index aa5fd69..9bc8aee 100644
--- a/include/pemagine/pe_structs.h
+++ b/include/pemagine/pe_structs.h
@@ -28,7 +28,7 @@ struct pe_raw_image_dos_hdr {
};
-struct pe_coff_file_hdr {
+struct pe_raw_coff_file_hdr {
unsigned char signature [0x04]; /* 0x00 */
unsigned char machine [0x02]; /* 0x04 */
unsigned char num_of_sections [0x02]; /* 0x06 */
diff --git a/include/pemagine/pemagine.h b/include/pemagine/pemagine.h
index db1023a..bc3e4dc 100644
--- a/include/pemagine/pemagine.h
+++ b/include/pemagine/pemagine.h
@@ -153,7 +153,7 @@ typedef int pe_enum_image_import_hdrs_callback(
/* library functions */
pe_api struct pe_raw_image_dos_hdr * pe_get_image_dos_hdr_addr (const void * base);
-pe_api struct pe_coff_file_hdr * pe_get_image_coff_hdr_addr (const void * base);
+pe_api struct pe_raw_coff_file_hdr * pe_get_image_coff_hdr_addr (const void * base);
pe_api union pe_opt_hdr * pe_get_image_opt_hdr_addr (const void * base);
pe_api struct pe_data_dirs * pe_get_image_data_dirs_addr (const void * base);
pe_api struct pe_sec_hdr * pe_get_image_section_tbl_addr (const void * base);
diff --git a/src/headers/pe_get_image_coff_hdr_addr.c b/src/headers/pe_get_image_coff_hdr_addr.c
index 6951095..1a2d9cf 100644
--- a/src/headers/pe_get_image_coff_hdr_addr.c
+++ b/src/headers/pe_get_image_coff_hdr_addr.c
@@ -10,17 +10,17 @@
#include <pemagine/pemagine.h>
pe_api
-struct pe_coff_file_hdr * pe_get_image_coff_hdr_addr(const void * base)
+struct pe_raw_coff_file_hdr * pe_get_image_coff_hdr_addr(const void * base)
{
struct pe_raw_image_dos_hdr * dos;
- struct pe_coff_file_hdr * coff;
+ struct pe_raw_coff_file_hdr * coff;
uint32_t * offset;
if (!(dos = pe_get_image_dos_hdr_addr(base)))
return 0;
offset = (uint32_t *)(dos->dos_lfanew);
- coff = (struct pe_coff_file_hdr *)pe_va_from_rva(base,*offset);
+ coff = (struct pe_raw_coff_file_hdr *)pe_va_from_rva(base,*offset);
if ((coff->signature[0] == 'P') && (coff->signature[1] == 'E')
&& (coff->signature[2] == '\0') && (coff->signature[3] == '\0'))
diff --git a/src/headers/pe_get_image_opt_hdr_addr.c b/src/headers/pe_get_image_opt_hdr_addr.c
index dcb8c48..df3ec63 100644
--- a/src/headers/pe_get_image_opt_hdr_addr.c
+++ b/src/headers/pe_get_image_opt_hdr_addr.c
@@ -11,7 +11,7 @@
pe_api
union pe_opt_hdr * pe_get_image_opt_hdr_addr(const void * base)
{
- struct pe_coff_file_hdr * coff;
+ struct pe_raw_coff_file_hdr * coff;
if (!(coff = pe_get_image_coff_hdr_addr(base)))
return 0;
diff --git a/src/headers/pe_get_image_section_tbl_addr.c b/src/headers/pe_get_image_section_tbl_addr.c
index 01dabb5..52e24d0 100644
--- a/src/headers/pe_get_image_section_tbl_addr.c
+++ b/src/headers/pe_get_image_section_tbl_addr.c
@@ -13,7 +13,7 @@
pe_api
struct pe_sec_hdr * pe_get_image_section_tbl_addr (const void * base)
{
- struct pe_coff_file_hdr * coff;
+ struct pe_raw_coff_file_hdr * coff;
union pe_opt_hdr * opt;
if (!(coff = pe_get_image_coff_hdr_addr(base)))
@@ -30,7 +30,7 @@ struct pe_sec_hdr * pe_get_image_named_section_addr (const void * base, const ch
{
uint16_t count;
struct pe_sec_hdr * hdr;
- struct pe_coff_file_hdr*coff;
+ struct pe_raw_coff_file_hdr*coff;
char * ch;
uint32_t len;
uint32_t pos;