summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/info/pe_get_image_abi.c2
-rw-r--r--src/logic/pe_get_image_meta.c4
-rw-r--r--src/reader/pe_read_optional_header.c20
3 files changed, 13 insertions, 13 deletions
diff --git a/src/info/pe_get_image_abi.c b/src/info/pe_get_image_abi.c
index 0c13276..665469a 100644
--- a/src/info/pe_get_image_abi.c
+++ b/src/info/pe_get_image_abi.c
@@ -19,7 +19,7 @@ int pe_get_image_abi(const struct pe_image_meta * m, struct pe_info_string * inf
{
int abi;
- switch (m->opt.std.magic) {
+ switch (m->opt.std.coh_magic) {
case PE_MAGIC_PE32:
abi = PE_ABI_PE32;
break;
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index bb461ff..8d0747e 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -301,11 +301,11 @@ int pe_get_image_meta(
if ((ret = pe_read_import_lookup(
&(m->idata[i].aitems[j]),
&(m->idata[i].items[j]),
- m->opt.std.magic)))
+ m->opt.std.coh_magic)))
return pe_free_image_meta_impl(
m,PERK_CUSTOM_ERROR(dctx,ret));
- switch (m->opt.std.magic) {
+ switch (m->opt.std.coh_magic) {
case PE_MAGIC_PE32:
m->idata[i].items[j].flags = m->idata[i].items[j].u.import_lookup_entry_32;
break;
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index 5ece6a3..b32dd6f 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -22,9 +22,9 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
struct pe_raw_opt_hdr_img * aimg;
struct pe_raw_opt_hdr_ldr * aldr;
- m->std.magic = pe_read_short(p->opt_hdr_32.magic);
+ m->std.coh_magic = pe_read_short(p->opt_hdr_32.magic);
- switch (m->std.magic) {
+ switch (m->std.coh_magic) {
case PE_MAGIC_PE32:
astd = (struct pe_raw_opt_hdr_std *)p;
avers = (struct pe_raw_opt_hdr_vers *)&p->opt_hdr_32.major_os_ver;
@@ -46,14 +46,14 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
}
/* std */
- m->std.major_linker_ver = astd->major_linker_ver[0];
- m->std.minor_linker_ver = astd->minor_linker_ver[0];
+ m->std.coh_major_linker_ver = astd->coh_major_linker_ver[0];
+ m->std.coh_minor_linker_ver = astd->coh_minor_linker_ver[0];
- m->std.size_of_code = pe_read_long(astd->size_of_code);
- m->std.size_of_initialized_data = pe_read_long(astd->size_of_initialized_data);
- m->std.size_of_uninitialized_data = pe_read_long(astd->size_of_uninitialized_data);
- m->std.entry_point = pe_read_long(astd->entry_point);
- m->std.base_of_code = pe_read_long(astd->base_of_code);
+ m->std.coh_size_of_code = pe_read_long(astd->coh_size_of_code);
+ m->std.coh_size_of_inited_data = pe_read_long(astd->coh_size_of_inited_data);
+ m->std.coh_size_of_uninited_data = pe_read_long(astd->coh_size_of_uninited_data);
+ m->std.coh_entry_point = pe_read_long(astd->coh_entry_point);
+ m->std.coh_base_of_code = pe_read_long(astd->coh_base_of_code);
/* vers */
m->vers.major_os_ver = pe_read_short(avers->major_os_ver);
@@ -106,7 +106,7 @@ int pe_read_optional_header(const union pe_raw_opt_hdr * p, struct pe_meta_opt_h
if ((ret = pe_read_optional_header_structs(p,m)))
return ret;
- switch (m->std.magic) {
+ switch (m->std.coh_magic) {
case PE_MAGIC_PE32:
m->mem.base_of_data = pe_read_long(p->opt_hdr_32.base_of_data);
m->mem.image_base = pe_read_long(p->opt_hdr_32.image_base);