summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-02-04 08:24:03 -0500
committermidipix <writeonce@midipix.org>2017-02-04 08:24:03 -0500
commit822ef04f335206139e9dac15c96c70610e4e77ed (patch)
tree252beb75432bb610da87158543bbaae21bf6ae8a
parent4348f399e9a5aa6c062a4fa5d62d77a929781238 (diff)
downloadperk-822ef04f335206139e9dac15c96c70610e4e77ed.tar.bz2
perk-822ef04f335206139e9dac15c96c70610e4e77ed.tar.xz
raw data: renamed struct pe_raw_coff_file_hdr --> struct pe_raw_coff_image_hdr.
-rw-r--r--include/perk/perk.h4
-rw-r--r--include/perk/perk_structs.h2
-rw-r--r--src/logic/pe_get_image_meta.c2
-rw-r--r--src/reader/pe_read_coff_header.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 374442a..30cc47d 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -104,7 +104,7 @@ struct pe_image_meta {
struct pe_raw_image image;
struct pe_raw_image_dos_hdr * ados;
- struct pe_raw_coff_file_hdr * acoff;
+ struct pe_raw_coff_image_hdr * acoff;
union pe_raw_opt_hdr * aopt;
struct pe_raw_sec_hdr * asectbl;
@@ -197,7 +197,7 @@ perk_api int pe_get_image_framework (const struct pe_image_meta *, struct pe_in
/* low-level api */
perk_api int pe_read_dos_header (const struct pe_raw_image_dos_hdr *, struct pe_meta_image_dos_hdr *);
-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_coff_header (const struct pe_raw_coff_image_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_raw_export_hdr *, struct pe_meta_export_hdr *);
diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h
index 0dc3a8a..5105cd1 100644
--- a/include/perk/perk_structs.h
+++ b/include/perk/perk_structs.h
@@ -28,7 +28,7 @@ struct pe_raw_image_dos_hdr {
};
-struct pe_raw_coff_file_hdr {
+struct pe_raw_coff_image_hdr {
unsigned char cfh_signature [0x04]; /* 0x00 */
unsigned char cfh_machine [0x02]; /* 0x04 */
unsigned char cfh_num_of_sections [0x02]; /* 0x06 */
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 0155e6b..0aed2de 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -183,7 +183,7 @@ int pe_get_image_meta(
return pe_free_image_meta_impl(
m,PERK_CUSTOM_ERROR(dctx,ret));
- m->acoff = (struct pe_raw_coff_file_hdr *)(base + m->dos.dos_lfanew);
+ m->acoff = (struct pe_raw_coff_image_hdr *)(base + m->dos.dos_lfanew);
if ((ret = (pe_read_coff_header(m->acoff,&m->coff))))
return pe_free_image_meta_impl(
diff --git a/src/reader/pe_read_coff_header.c b/src/reader/pe_read_coff_header.c
index 12268f1..524ec21 100644
--- a/src/reader/pe_read_coff_header.c
+++ b/src/reader/pe_read_coff_header.c
@@ -10,7 +10,7 @@
#include "perk_endian_impl.h"
#include "perk_reader_impl.h"
-int pe_read_coff_header(const struct pe_raw_coff_file_hdr * p, struct pe_meta_coff_file_hdr * m)
+int pe_read_coff_header(const struct pe_raw_coff_image_hdr * p, struct pe_meta_coff_file_hdr * m)
{
if ((p->cfh_signature[0] != 'P') || (p->cfh_signature[1] != 'E')
|| p->cfh_signature[2] || p->cfh_signature[3])