summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-19 13:41:46 -0500
committermidipix <writeonce@midipix.org>2016-11-19 13:41:46 -0500
commite75572e655b000e16952ccfd404917b7edb9ccda (patch)
tree29d462e8d3e64050f2e48780453664b9dff8f08b
parent34ee9eb04f8ad9113ca92cc7a5aa2cd0d45e4330 (diff)
downloadperk-e75572e655b000e16952ccfd404917b7edb9ccda.tar.bz2
perk-e75572e655b000e16952ccfd404917b7edb9ccda.tar.xz
PE format: struct pe_coff_symbol [and friends] --> struct pe_raw_coff_symbol.
-rw-r--r--include/perk/perk.h2
-rw-r--r--include/perk/perk_structs.h4
-rw-r--r--src/logic/pe_get_image_meta.c4
-rw-r--r--src/output/pe_output_image_symbols.c4
-rw-r--r--src/reader/pe_read_coff_symbol.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 8bffb59..ec73ddc 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -203,7 +203,7 @@ perk_api int pe_read_section_header (const struct pe_raw_sec_hdr *, struct pe_
perk_api int pe_read_export_header (const struct pe_raw_export_hdr *, struct pe_meta_export_hdr *);
perk_api int pe_read_import_header (const struct pe_raw_import_hdr *, struct pe_meta_import_hdr *);
-perk_api int pe_read_coff_symbol (const struct pe_coff_symbol *, struct pe_meta_coff_symbol *,
+perk_api int pe_read_coff_symbol (const struct pe_raw_coff_symbol *, struct pe_meta_coff_symbol *,
const struct pe_meta_coff_file_hdr *, void * base);
perk_api int pe_read_import_lookup (const union pe_raw_import_lookup *, struct pe_meta_import_lookup *,
diff --git a/include/perk/perk_structs.h b/include/perk/perk_structs.h
index 7113409..2875daa 100644
--- a/include/perk/perk_structs.h
+++ b/include/perk/perk_structs.h
@@ -287,7 +287,7 @@ struct pe_raw_hint_name_entry {
};
-struct pe_coff_symbol {
+struct pe_raw_coff_symbol {
unsigned char name [0x08]; /* 0x00 */
unsigned char value [0x04]; /* 0x08 */
unsigned char section_number [0x02]; /* 0x0c */
@@ -296,7 +296,7 @@ struct pe_coff_symbol {
unsigned char num_of_aux_symbols [0x01]; /* 0x11 */
};
-struct pe_coff_symbol_name {
+struct pe_raw_coff_symbol_name {
union {
unsigned char short_name [0x08]; /* 0x00 */
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 20ab387..ec7ad82 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -190,10 +190,10 @@ int pe_get_image_meta(
m,PERK_CUSTOM_ERROR(dctx,ret));
mark = (const unsigned char *)image->addr + m->coff.ptr_to_sym_tbl;
- mark += m->coff.num_of_syms * sizeof(struct pe_coff_symbol);
+ mark += m->coff.num_of_syms * sizeof(struct pe_raw_coff_symbol);
m->coff.ptr_to_string_tbl = m->coff.ptr_to_sym_tbl;
- m->coff.ptr_to_string_tbl += m->coff.num_of_syms * sizeof(struct pe_coff_symbol);
+ m->coff.ptr_to_string_tbl += m->coff.num_of_syms * sizeof(struct pe_raw_coff_symbol);
m->coff.size_of_string_tbl = pe_read_long(mark);
mark = &m->acoff->signature[0];
diff --git a/src/output/pe_output_image_symbols.c b/src/output/pe_output_image_symbols.c
index e645948..3dc7eb3 100644
--- a/src/output/pe_output_image_symbols.c
+++ b/src/output/pe_output_image_symbols.c
@@ -19,7 +19,7 @@ int pe_output_image_symbols(
{
unsigned i;
char * mark;
- struct pe_coff_symbol * symtbl;
+ struct pe_raw_coff_symbol * symtbl;
struct pe_meta_coff_symbol symrec;
const char * dash = "";
@@ -34,7 +34,7 @@ int pe_output_image_symbols(
}
mark = (char *)meta->image.addr;
- symtbl = (struct pe_coff_symbol *)(mark + meta->coff.ptr_to_sym_tbl);
+ symtbl = (struct pe_raw_coff_symbol *)(mark + meta->coff.ptr_to_sym_tbl);
for (i=0; i<meta->coff.num_of_syms; i++) {
pe_read_coff_symbol(
diff --git a/src/reader/pe_read_coff_symbol.c b/src/reader/pe_read_coff_symbol.c
index 2cd63cc..259f370 100644
--- a/src/reader/pe_read_coff_symbol.c
+++ b/src/reader/pe_read_coff_symbol.c
@@ -11,7 +11,7 @@
#include "perk_reader_impl.h"
int pe_read_coff_symbol(
- const struct pe_coff_symbol * p,
+ const struct pe_raw_coff_symbol * p,
struct pe_meta_coff_symbol * m,
const struct pe_meta_coff_file_hdr * coff,
void * base)