summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmds/pe_cmd_perk.c3
-rw-r--r--src/driver/pe_driver_ctx.c4
-rw-r--r--src/internal/perk_driver_impl.h1
-rw-r--r--src/skin/pe_skin_perk.c4
4 files changed, 12 insertions, 0 deletions
diff --git a/src/cmds/pe_cmd_perk.c b/src/cmds/pe_cmd_perk.c
index bdb6364..37b80ee 100644
--- a/src/cmds/pe_cmd_perk.c
+++ b/src/cmds/pe_cmd_perk.c
@@ -64,6 +64,9 @@ static void pe_perform_unit_actions_impl(
if ((flags & PERK_OUTPUT_MDSO_LIBS) || (flags & PERK_OUTPUT_MDSO_SYMS))
pe_output_mdso_libraries(dctx,meta);
+ if (flags & PERK_OUTPUT_BASE_RELOCS)
+ pe_output_base_relocs(dctx,meta);
+
if (dctx->cctx->hdrdump)
pe_perform_hdrdump_actions(dctx,meta);
}
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 6a260bd..9e6a17e 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -251,6 +251,10 @@ static int pe_cctx_update(
cctx->fmtflags |= PERK_OUTPUT_IMAGE_STRINGS;
break;
+ case TAG_RELOCS:
+ cctx->fmtflags |= PERK_OUTPUT_BASE_RELOCS;
+ break;
+
case TAG_EXPSYMS:
cctx->fmtflags |= PERK_OUTPUT_EXPORT_SYMS;
break;
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h
index 5cd0d73..fdf75c3 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -32,6 +32,7 @@ enum app_tags {
TAG_IMPSYMS,
TAG_DSOLIBS,
TAG_DSOSYMS,
+ TAG_RELOCS,
TAG_HDRDUMP,
TAG_AR_LIST_MEMBERS,
TAG_AR_PRINT_MEMBERS,
diff --git a/src/skin/pe_skin_perk.c b/src/skin/pe_skin_perk.c
index 3678341..fd891c8 100644
--- a/src/skin/pe_skin_perk.c
+++ b/src/skin/pe_skin_perk.c
@@ -44,6 +44,10 @@ const perk_hidden struct argv_option pe_perk_options[] = {
"list .dsometa (mdso) dependency libraries "
"along with referenced symbols"},
+ {"relocs", 'r',TAG_RELOCS,ARGV_OPTARG_NONE,0,0,0,
+ "list image base relocations found "
+ "in the .reloc section"},
+
{"hdrdump", 'X',TAG_HDRDUMP,ARGV_OPTARG_OPTIONAL,0,
"dos|image.dos|"
"coff|coff.image|coff.object|coff.optional|"