summaryrefslogtreecommitdiffhomepage
path: root/src/output
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-13 08:55:19 -0500
committermidipix <writeonce@midipix.org>2017-12-13 11:24:14 -0500
commit58ced9c919a0fae75e98c937ac55f8e30fc01c6f (patch)
treee4c0e3aa9dd830dee0e874778d337d2ef44cad48 /src/output
parent753060eae1596558287a306bcb7b70343c8a830e (diff)
downloadperk-58ced9c919a0fae75e98c937ac55f8e30fc01c6f.tar.bz2
perk-58ced9c919a0fae75e98c937ac55f8e30fc01c6f.tar.xz
refactor: struct pe_image_meta: meta members are now m-prefixed.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/pe_output_export_symbols.c4
-rw-r--r--src/output/pe_output_image_sections.c8
-rw-r--r--src/output/pe_output_image_strings.c4
-rw-r--r--src/output/pe_output_image_symbols.c6
-rw-r--r--src/output/pe_output_import_libraries.c12
5 files changed, 17 insertions, 17 deletions
diff --git a/src/output/pe_output_export_symbols.c b/src/output/pe_output_export_symbols.c
index 697d358..46ed9f9 100644
--- a/src/output/pe_output_export_symbols.c
+++ b/src/output/pe_output_export_symbols.c
@@ -53,9 +53,9 @@ int pe_output_export_symbols(
mark = m->image.addr;
offset = m->hedata->sh_virtual_addr - m->hedata->sh_ptr_to_raw_data;
- symrva = (uint32_t *)(mark + m->edata.eh_name_ptr_rva - offset);
+ symrva = (uint32_t *)(mark + m->m_edata.eh_name_ptr_rva - offset);
- for (i=0; i<m->edata.eh_num_of_name_ptrs; i++)
+ for (i=0; i<m->m_edata.eh_num_of_name_ptrs; i++)
if ((pretty_export_item(
cctx,
&mark[symrva[i] - offset],
diff --git a/src/output/pe_output_image_sections.c b/src/output/pe_output_image_sections.c
index 0102844..461cf5c 100644
--- a/src/output/pe_output_image_sections.c
+++ b/src/output/pe_output_image_sections.c
@@ -28,12 +28,12 @@ int pe_output_image_sections(
dash = "- ";
}
- for (i=0; i<meta->coff.cfh_num_of_sections; i++)
+ for (i=0; i<meta->m_coff.cfh_num_of_sections; i++)
if (fprintf(fout,"%s%s\n",
dash,
- meta->sectbl[i].sh_long_name
- ? meta->sectbl[i].sh_long_name
- : meta->sectbl[i].sh_name) < 0)
+ meta->m_sectbl[i].sh_long_name
+ ? meta->m_sectbl[i].sh_long_name
+ : meta->m_sectbl[i].sh_name) < 0)
return PERK_FILE_ERROR(dctx);
return 0;
diff --git a/src/output/pe_output_image_strings.c b/src/output/pe_output_image_strings.c
index 549348d..5ffbf93 100644
--- a/src/output/pe_output_image_strings.c
+++ b/src/output/pe_output_image_strings.c
@@ -33,9 +33,9 @@ int pe_output_image_strings(
}
mark = (char *)meta->image.addr;
- mark += meta->coff.cfh_ptr_to_str_tbl;
+ mark += meta->m_coff.cfh_ptr_to_str_tbl;
- cap = mark + meta->coff.cfh_size_of_str_tbl;
+ cap = mark + meta->m_coff.cfh_size_of_str_tbl;
mark += sizeof(uint32_t);
for (ch=mark; ch<cap; ) {
diff --git a/src/output/pe_output_image_symbols.c b/src/output/pe_output_image_symbols.c
index 3e828c7..7f16d79 100644
--- a/src/output/pe_output_image_symbols.c
+++ b/src/output/pe_output_image_symbols.c
@@ -34,12 +34,12 @@ int pe_output_image_symbols(
}
mark = (char *)meta->image.addr;
- symtbl = (struct pe_raw_coff_symbol *)(mark + meta->coff.cfh_ptr_to_sym_tbl);
+ symtbl = (struct pe_raw_coff_symbol *)(mark + meta->m_coff.cfh_ptr_to_sym_tbl);
- for (i=0; i<meta->coff.cfh_num_of_syms; i++) {
+ for (i=0; i<meta->m_coff.cfh_num_of_syms; i++) {
pe_read_coff_symbol(
&symtbl[i],&symrec,
- &meta->coff,meta->image.addr);
+ &meta->m_coff,meta->image.addr);
if (fprintf(fout,"%s%s\n",
dash,
diff --git a/src/output/pe_output_import_libraries.c b/src/output/pe_output_import_libraries.c
index 4c317ff..745ab5b 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->mstats.nimplibs)
+ if (!m->m_stats.nimplibs)
return 0;
if (!fout)
@@ -59,16 +59,16 @@ int pe_output_import_libraries(
if ((pretty_header(cctx,fout)) < 0)
return PERK_FILE_ERROR(dctx);
- for (i=0; i<m->mstats.nimplibs; i++) {
- if ((pretty_implib_header(cctx,m->idata[i].ih_name,fout)) < 0)
+ for (i=0; i<m->m_stats.nimplibs; i++) {
+ if ((pretty_implib_header(cctx,m->m_idata[i].ih_name,fout)) < 0)
return PERK_FILE_ERROR(dctx);
if (cctx->fmtflags & PERK_OUTPUT_IMPORT_SYMS)
- for (j=0; j<m->idata[i].ih_count; j++)
- if (m->idata[i].ih_items[j].ii_name)
+ for (j=0; j<m->m_idata[i].ih_count; j++)
+ if (m->m_idata[i].ih_items[j].ii_name)
if ((pretty_implib_item(
cctx,
- m->idata[i].ih_items[j].ii_name,
+ m->m_idata[i].ih_items[j].ii_name,
fout)) < 0)
return PERK_FILE_ERROR(dctx);
}