diff options
author | midipix <writeonce@midipix.org> | 2016-11-19 14:59:36 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-19 14:59:36 -0500 |
commit | 9089cb43bd0082e5558374d5297e918a801533c3 (patch) | |
tree | caa4823c0a491d5ab89e4215e2da6d1983f32cbf | |
parent | fb643b72651055c924188fd22f1d24f5ec604fe0 (diff) | |
download | pemagine-9089cb43bd0082e5558374d5297e918a801533c3.tar.bz2 pemagine-9089cb43bd0082e5558374d5297e918a801533c3.tar.xz |
PE format: struct pe_sec_hdr --> struct pe_raw_sec_hdr.
-rw-r--r-- | include/pemagine/pe_structs.h | 2 | ||||
-rw-r--r-- | include/pemagine/pemagine.h | 4 | ||||
-rw-r--r-- | src/headers/pe_get_image_section_tbl_addr.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/include/pemagine/pe_structs.h b/include/pemagine/pe_structs.h index 430c967..a1886b9 100644 --- a/include/pemagine/pe_structs.h +++ b/include/pemagine/pe_structs.h @@ -229,7 +229,7 @@ struct pe_raw_image_data_dir { }; -struct pe_sec_hdr { +struct pe_raw_sec_hdr { unsigned char name [0x08]; /* 0x00 */ unsigned char virtual_size [0x04]; /* 0x08 */ unsigned char virtual_addr [0x04]; /* 0x0c */ diff --git a/include/pemagine/pemagine.h b/include/pemagine/pemagine.h index 7d0ee93..f427bdb 100644 --- a/include/pemagine/pemagine.h +++ b/include/pemagine/pemagine.h @@ -156,8 +156,8 @@ pe_api struct pe_raw_image_dos_hdr * pe_get_image_dos_hdr_addr (const void * bas pe_api struct pe_raw_coff_file_hdr * pe_get_image_coff_hdr_addr (const void * base); pe_api union pe_raw_opt_hdr * pe_get_image_opt_hdr_addr (const void * base); pe_api struct pe_raw_data_dirs * pe_get_image_data_dirs_addr (const void * base); -pe_api struct pe_sec_hdr * pe_get_image_section_tbl_addr (const void * base); -pe_api struct pe_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name); +pe_api struct pe_raw_sec_hdr * pe_get_image_section_tbl_addr (const void * base); +pe_api struct pe_raw_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name); pe_api struct pe_export_hdr * pe_get_image_export_hdr_addr (const void * base, uint32_t * sec_size); pe_api struct pe_import_hdr * pe_get_image_import_dir_addr (const void * base, uint32_t * sec_size); pe_api void * pe_get_image_special_hdr_addr (const void * base, uint32_t ordinal, uint32_t * sec_size); diff --git a/src/headers/pe_get_image_section_tbl_addr.c b/src/headers/pe_get_image_section_tbl_addr.c index bbab5a2..3dad1f5 100644 --- a/src/headers/pe_get_image_section_tbl_addr.c +++ b/src/headers/pe_get_image_section_tbl_addr.c @@ -11,7 +11,7 @@ #include "pe_impl.h" pe_api -struct pe_sec_hdr * pe_get_image_section_tbl_addr (const void * base) +struct pe_raw_sec_hdr * pe_get_image_section_tbl_addr (const void * base) { struct pe_raw_coff_file_hdr * coff; union pe_raw_opt_hdr * opt; @@ -22,14 +22,14 @@ struct pe_sec_hdr * pe_get_image_section_tbl_addr (const void * base) if (!(opt = pe_get_image_opt_hdr_addr(base))) return 0; - return (struct pe_sec_hdr *)((char *)opt + *(uint16_t *)coff->size_of_opt_hdr); + return (struct pe_raw_sec_hdr *)((char *)opt + *(uint16_t *)coff->size_of_opt_hdr); } pe_api -struct pe_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name) +struct pe_raw_sec_hdr * pe_get_image_named_section_addr (const void * base, const char * name) { uint16_t count; - struct pe_sec_hdr * hdr; + struct pe_raw_sec_hdr * hdr; struct pe_raw_coff_file_hdr*coff; char * ch; uint32_t len; |