summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-30 19:59:44 -0500
committermidipix <writeonce@midipix.org>2016-11-30 19:59:44 -0500
commitb6ce09976af9f8fe50846806296d4c2b7fccda10 (patch)
treed5af880de408020ee8340823981efc48b2a33dcb
parent9fdefdbcf17d60170da462a8c65ad0f863b3f465 (diff)
downloadperk-b6ce09976af9f8fe50846806296d4c2b7fccda10.tar.bz2
perk-b6ce09976af9f8fe50846806296d4c2b7fccda10.tar.xz
struct pe_{raw|meta}_opt_hdr_img: member name normalization.
-rw-r--r--include/perk/perk_meta.h10
-rw-r--r--include/perk/perk_structs.h10
-rw-r--r--src/info/pe_get_image_framework.c6
-rw-r--r--src/info/pe_get_image_subsystem.c6
-rw-r--r--src/reader/pe_read_optional_header.c10
5 files changed, 21 insertions, 21 deletions
diff --git a/include/perk/perk_meta.h b/include/perk/perk_meta.h
index 24086d4..4acb5dd 100644
--- a/include/perk/perk_meta.h
+++ b/include/perk/perk_meta.h
@@ -112,11 +112,11 @@ struct pe_meta_opt_hdr_vers {
};
struct pe_meta_opt_hdr_img {
- uint32_t size_of_image;
- uint32_t size_of_headers;
- uint32_t checksum;
- uint16_t subsystem;
- uint16_t dll_characteristics;
+ uint32_t coh_size_of_image;
+ uint32_t coh_size_of_headers;
+ uint32_t coh_checksum;
+ uint16_t coh_subsystem;
+ uint16_t coh_dll_characteristics;
};
struct pe_meta_opt_hdr_ldr {
diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h
index c942f47..c520da3 100644
--- a/include/perk/perk_structs.h
+++ b/include/perk/perk_structs.h
@@ -67,11 +67,11 @@ struct pe_raw_opt_hdr_vers {
};
struct pe_raw_opt_hdr_img {
- unsigned char size_of_image [0x04]; /* 0x38 */
- unsigned char size_of_headers [0x04]; /* 0x3c */
- unsigned char checksum [0x04]; /* 0x40 */
- unsigned char subsystem [0x02]; /* 0x44 */
- unsigned char dll_characteristics [0x02]; /* 0x46 */
+ unsigned char coh_size_of_image [0x04]; /* 0x38 */
+ unsigned char coh_size_of_headers [0x04]; /* 0x3c */
+ unsigned char coh_checksum [0x04]; /* 0x40 */
+ unsigned char coh_subsystem [0x02]; /* 0x44 */
+ unsigned char coh_dll_characteristics [0x02]; /* 0x46 */
};
struct pe_raw_opt_hdr_ldr {
diff --git a/src/info/pe_get_image_framework.c b/src/info/pe_get_image_framework.c
index 26ffc1b..10594f6 100644
--- a/src/info/pe_get_image_framework.c
+++ b/src/info/pe_get_image_framework.c
@@ -85,13 +85,13 @@ int pe_get_image_framework(const struct pe_image_meta * m, struct pe_info_string
else if (pe_image_is_mingw(m))
framework = PE_FRAMEWORK_MINGW;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_POSIX_CUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_POSIX_CUI)
framework = PE_FRAMEWORK_SUACON;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_CUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_CUI)
framework = PE_FRAMEWORK_WINCON;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_GUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_GUI)
framework = PE_FRAMEWORK_WIN32;
else
diff --git a/src/info/pe_get_image_subsystem.c b/src/info/pe_get_image_subsystem.c
index e4529aa..28456e8 100644
--- a/src/info/pe_get_image_subsystem.c
+++ b/src/info/pe_get_image_subsystem.c
@@ -26,14 +26,14 @@ int pe_get_image_subsystem(const struct pe_image_meta * m, struct pe_info_string
{
int subsystem;
- if (m->opt.img.subsystem >= 0x10)
+ if (m->opt.img.coh_subsystem >= 0x10)
subsystem = -1;
- else if (!pe_subsystem_str[m->opt.img.subsystem])
+ else if (!pe_subsystem_str[m->opt.img.coh_subsystem])
subsystem = -1;
else
- subsystem = m->opt.img.subsystem;
+ subsystem = m->opt.img.coh_subsystem;
if ((subsystem < 0) && infostr) {
strcpy(infostr->buffer,"INVALID");
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index f331604..148dc2d 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -70,12 +70,12 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
m->align.coh_file_align = pe_read_long(aalign->coh_file_align);
/* img */
- m->img.size_of_image = pe_read_long(aimg->size_of_image);
- m->img.size_of_headers = pe_read_long(aimg->size_of_headers);
- m->img.checksum = pe_read_long(aimg->checksum);
+ m->img.coh_size_of_image = pe_read_long(aimg->coh_size_of_image);
+ m->img.coh_size_of_headers = pe_read_long(aimg->coh_size_of_headers);
+ m->img.coh_checksum = pe_read_long(aimg->coh_checksum);
- m->img.subsystem = pe_read_short(aimg->subsystem);
- m->img.dll_characteristics = pe_read_short(aimg->dll_characteristics);
+ m->img.coh_subsystem = pe_read_short(aimg->coh_subsystem);
+ m->img.coh_dll_characteristics = pe_read_short(aimg->coh_dll_characteristics);
/* ldr */
m->ldr.loader_flags = pe_read_long(aldr->loader_flags);