summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/perk/perk.h4
-rw-r--r--src/info/pe_get_image_framework.c6
-rw-r--r--src/logic/pe_get_image_meta.c10
-rw-r--r--src/output/pe_output_import_libraries.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 85d6694..79a0843 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -83,14 +83,14 @@ struct pe_expsym {
uint32_t roffset;
};
-struct pe_meta_summary {
+struct pe_meta_stats {
int32_t nexpsyms;
int32_t nimplibs;
int32_t nrelocs;
};
struct pe_image_meta {
- struct pe_meta_summary summary;
+ struct pe_meta_stats mstats;
struct pe_meta_image_dos_hdr dos;
struct pe_meta_coff_file_hdr coff;
struct pe_meta_opt_hdr opt;
diff --git a/src/info/pe_get_image_framework.c b/src/info/pe_get_image_framework.c
index 0264a54..e19abd2 100644
--- a/src/info/pe_get_image_framework.c
+++ b/src/info/pe_get_image_framework.c
@@ -27,7 +27,7 @@ static const char * const pe_framework_str[PE_FRAMEWORK_CAP] = {
static bool pe_image_is_psxscl(const struct pe_image_meta * m)
{
- return (!m->summary.nimplibs
+ return (!m->mstats.nimplibs
&& !pe_get_expsym_by_name(m,"__psx_init",0));
}
@@ -35,7 +35,7 @@ static bool pe_image_is_cygwin(const struct pe_image_meta * m)
{
int i;
- for (i=0; i<m->summary.nimplibs; i++)
+ for (i=0; i<m->mstats.nimplibs; i++)
if (!(strcmp(m->idata[i].ih_name,"cygwin1.dll")))
return true;
@@ -46,7 +46,7 @@ static bool pe_image_is_msys(const struct pe_image_meta * m)
{
int i;
- for (i=0; i<m->summary.nimplibs; i++)
+ for (i=0; i<m->mstats.nimplibs; i++)
if (!(strcmp(m->idata[i].ih_name,"msys-2.0.dll")))
return true;
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 64da869..412f06e 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -18,7 +18,7 @@ static int pe_free_image_meta_impl(struct pe_image_meta * meta, int ret)
int i;
if (meta) {
- for (i=0; i<meta->summary.nimplibs; i++)
+ for (i=0; i<meta->mstats.nimplibs; i++)
free(meta->idata[i].ih_items);
free(meta->idata);
@@ -259,7 +259,7 @@ int pe_get_image_meta(
if (m->aedata) {
pe_read_export_header(m->aedata,&m->edata);
- m->summary.nexpsyms = m->edata.eh_num_of_name_ptrs;
+ m->mstats.nexpsyms = m->edata.eh_num_of_name_ptrs;
}
/* .idata */
@@ -285,14 +285,14 @@ int pe_get_image_meta(
if (m->aidata) {
/* num of implibs */
for (pidata=m->aidata; pe_read_long(pidata->ih_name_rva); pidata++)
- m->summary.nimplibs++;
+ m->mstats.nimplibs++;
/* import headers */
- if (!(m->idata = calloc(m->summary.nimplibs,sizeof(*m->idata))))
+ if (!(m->idata = calloc(m->mstats.nimplibs,sizeof(*m->idata))))
return pe_free_image_meta_impl(
m,PERK_SYSTEM_ERROR(dctx));
- for (i=0; i<m->summary.nimplibs; i++) {
+ for (i=0; i<m->mstats.nimplibs; i++) {
pe_read_import_header(&m->aidata[i],&m->idata[i]);
m->idata[i].ih_name = base + m->hidata->sh_ptr_to_raw_data
diff --git a/src/output/pe_output_import_libraries.c b/src/output/pe_output_import_libraries.c
index 2281c42..4c317ff 100644
--- a/src/output/pe_output_import_libraries.c
+++ b/src/output/pe_output_import_libraries.c
@@ -50,7 +50,7 @@ int pe_output_import_libraries(
unsigned j;
const struct pe_common_ctx * cctx = dctx->cctx;
- if (!m->summary.nimplibs)
+ if (!m->mstats.nimplibs)
return 0;
if (!fout)
@@ -59,7 +59,7 @@ int pe_output_import_libraries(
if ((pretty_header(cctx,fout)) < 0)
return PERK_FILE_ERROR(dctx);
- for (i=0; i<m->summary.nimplibs; i++) {
+ for (i=0; i<m->mstats.nimplibs; i++) {
if ((pretty_implib_header(cctx,m->idata[i].ih_name,fout)) < 0)
return PERK_FILE_ERROR(dctx);