summaryrefslogtreecommitdiffhomepage
path: root/src/reader
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 12:01:00 -0500
committermidipix <writeonce@midipix.org>2016-11-19 12:04:13 -0500
commit8cb34ff6894a6b3066ece4d2eca60c030202e695 (patch)
treec3b8d76a16c4bba51f7d2702c2e3219ed860dda6 /src/reader
parent11fb1c69c1701d2bf6532443a7e9f57344308cdd (diff)
downloadperk-8cb34ff6894a6b3066ece4d2eca60c030202e695.tar.bz2
perk-8cb34ff6894a6b3066ece4d2eca60c030202e695.tar.xz
PE format: union pe_opt_hdr [and friends] --> union pe_raw_opt_hdr.
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/pe_read_optional_header.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index 8ab46f2..5ece6a3 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -10,35 +10,35 @@
#include "perk_endian_impl.h"
#include "perk_reader_impl.h"
-static int pe_read_optional_header_structs(const union pe_opt_hdr * p, struct pe_meta_opt_hdr * m)
+static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struct pe_meta_opt_hdr * m)
{
unsigned int i;
struct pe_block * pdir;
const unsigned char * mark;
- struct pe_opt_hdr_std * astd;
- struct pe_opt_hdr_vers * avers;
- struct pe_opt_hdr_align * aalign;
- struct pe_opt_hdr_img * aimg;
- struct pe_opt_hdr_ldr * aldr;
+ struct pe_raw_opt_hdr_std * astd;
+ struct pe_raw_opt_hdr_vers * avers;
+ struct pe_raw_opt_hdr_align * aalign;
+ 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);
switch (m->std.magic) {
case PE_MAGIC_PE32:
- astd = (struct pe_opt_hdr_std *)p;
- avers = (struct pe_opt_hdr_vers *)&p->opt_hdr_32.major_os_ver;
- aalign = (struct pe_opt_hdr_align *)&p->opt_hdr_32.section_align;
- aimg = (struct pe_opt_hdr_img *)&p->opt_hdr_32.size_of_image;
- aldr = (struct pe_opt_hdr_ldr *)&p->opt_hdr_32.loader_flags;
+ astd = (struct pe_raw_opt_hdr_std *)p;
+ avers = (struct pe_raw_opt_hdr_vers *)&p->opt_hdr_32.major_os_ver;
+ aalign = (struct pe_raw_opt_hdr_align *)&p->opt_hdr_32.section_align;
+ aimg = (struct pe_raw_opt_hdr_img *)&p->opt_hdr_32.size_of_image;
+ aldr = (struct pe_raw_opt_hdr_ldr *)&p->opt_hdr_32.loader_flags;
break;
case PE_MAGIC_PE32_PLUS:
- astd = (struct pe_opt_hdr_std *)p;
- avers = (struct pe_opt_hdr_vers *)&p->opt_hdr_64.major_os_ver;
- aalign = (struct pe_opt_hdr_align *)&p->opt_hdr_64.section_align;
- aimg = (struct pe_opt_hdr_img *)&p->opt_hdr_64.size_of_image;
- aldr = (struct pe_opt_hdr_ldr *)&p->opt_hdr_64.loader_flags;
+ astd = (struct pe_raw_opt_hdr_std *)p;
+ avers = (struct pe_raw_opt_hdr_vers *)&p->opt_hdr_64.major_os_ver;
+ aalign = (struct pe_raw_opt_hdr_align *)&p->opt_hdr_64.section_align;
+ aimg = (struct pe_raw_opt_hdr_img *)&p->opt_hdr_64.size_of_image;
+ aldr = (struct pe_raw_opt_hdr_ldr *)&p->opt_hdr_64.loader_flags;
break;
default:
@@ -99,7 +99,7 @@ static int pe_read_optional_header_structs(const union pe_opt_hdr * p, struct pe
return 0;
}
-int pe_read_optional_header(const union pe_opt_hdr * p, struct pe_meta_opt_hdr * m)
+int pe_read_optional_header(const union pe_raw_opt_hdr * p, struct pe_meta_opt_hdr * m)
{
int ret;