summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_coff_header.c26
-rw-r--r--src/reader/pe_read_coff_symbol.c4
2 files changed, 15 insertions, 15 deletions
diff --git a/src/reader/pe_read_coff_header.c b/src/reader/pe_read_coff_header.c
index 1b4dfe3..12268f1 100644
--- a/src/reader/pe_read_coff_header.c
+++ b/src/reader/pe_read_coff_header.c
@@ -12,24 +12,24 @@
int pe_read_coff_header(const struct pe_raw_coff_file_hdr * p, struct pe_meta_coff_file_hdr * m)
{
- if ((p->signature[0] != 'P') || (p->signature[1] != 'E')
- || p->signature[2] || p->signature[3])
+ if ((p->cfh_signature[0] != 'P') || (p->cfh_signature[1] != 'E')
+ || p->cfh_signature[2] || p->cfh_signature[3])
return PERK_ERR_BAD_COFF_HEADER;
- m->signature[0] = p->signature[0];
- m->signature[1] = p->signature[1];
- m->signature[2] = p->signature[2];
- m->signature[3] = p->signature[3];
+ m->cfh_signature[0] = p->cfh_signature[0];
+ m->cfh_signature[1] = p->cfh_signature[1];
+ m->cfh_signature[2] = p->cfh_signature[2];
+ m->cfh_signature[3] = p->cfh_signature[3];
- m->machine = pe_read_short(p->machine);
- m->num_of_sections = pe_read_short(p->num_of_sections);
+ m->cfh_machine = pe_read_short(p->cfh_machine);
+ m->cfh_num_of_sections = pe_read_short(p->cfh_num_of_sections);
- m->time_date_stamp = pe_read_long(p->time_date_stamp);
- m->ptr_to_sym_tbl = pe_read_long(p->ptr_to_sym_tbl);
- m->num_of_syms = pe_read_long(p->num_of_syms);
+ m->cfh_time_date_stamp = pe_read_long(p->cfh_time_date_stamp);
+ m->cfh_ptr_to_sym_tbl = pe_read_long(p->cfh_ptr_to_sym_tbl);
+ m->cfh_num_of_syms = pe_read_long(p->cfh_num_of_syms);
- m->size_of_opt_hdr = pe_read_short(p->size_of_opt_hdr);
- m->characteristics = pe_read_short(p->characteristics);
+ m->cfh_size_of_opt_hdr = pe_read_short(p->cfh_size_of_opt_hdr);
+ m->cfh_characteristics = pe_read_short(p->cfh_characteristics);
return 0;
}
diff --git a/src/reader/pe_read_coff_symbol.c b/src/reader/pe_read_coff_symbol.c
index 259f370..0c6a40d 100644
--- a/src/reader/pe_read_coff_symbol.c
+++ b/src/reader/pe_read_coff_symbol.c
@@ -47,8 +47,8 @@ int pe_read_coff_symbol(
mark = (char *)base;
roffset = pe_read_long(&p->name[4]);
- if (roffset < coff->size_of_string_tbl)
- m->long_name = mark + coff->ptr_to_string_tbl + roffset;
+ if (roffset < coff->cfh_size_of_str_tbl)
+ m->long_name = mark + coff->cfh_ptr_to_str_tbl + roffset;
}
return 0;