summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-17 04:47:33 -0500
committermidipix <writeonce@midipix.org>2016-11-17 04:47:33 -0500
commitecf121476585a0c456689987c14d89ecc6364625 (patch)
treef3868eb156a5ec0036bd9b3937725cf1671c52af
parentd492af690ee0c2d756981f0a716299f726a7833e (diff)
downloadperk-ecf121476585a0c456689987c14d89ecc6364625.tar.bz2
perk-ecf121476585a0c456689987c14d89ecc6364625.tar.xz
driver: added --strings support (list strings found in the coff string table).
-rw-r--r--include/perk/perk_output.h1
-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_default.c3
4 files changed, 9 insertions, 0 deletions
diff --git a/include/perk/perk_output.h b/include/perk/perk_output.h
index d0a9c19..dd080e9 100644
--- a/include/perk/perk_output.h
+++ b/include/perk/perk_output.h
@@ -12,6 +12,7 @@
#define PERK_OUTPUT_IMAGE_CATEGORY 0x00000008
#define PERK_OUTPUT_IMAGE_SECTIONS 0x00000010
#define PERK_OUTPUT_IMAGE_SYMBOLS 0x00000020
+#define PERK_OUTPUT_IMAGE_STRINGS 0x00000040
/* pretty-printer flags */
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index accb9c1..b0135e9 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -166,6 +166,10 @@ int pe_get_driver_ctx(
cctx.fmtflags |= PERK_OUTPUT_IMAGE_SYMBOLS;
break;
+ case TAG_STRINGS:
+ cctx.fmtflags |= PERK_OUTPUT_IMAGE_STRINGS;
+ 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 4229977..a42f89d 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -18,6 +18,7 @@ enum app_tags {
TAG_CATEGORY,
TAG_SECTIONS,
TAG_SYMBOLS,
+ TAG_STRINGS,
TAG_EXPSYMS,
TAG_IMPLIBS,
TAG_IMPSYMS,
diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c
index 9c376e0..5c21363 100644
--- a/src/skin/pe_skin_default.c
+++ b/src/skin/pe_skin_default.c
@@ -20,6 +20,9 @@ const struct argv_option pe_default_options[] = {
{"symbols", 'm',TAG_SYMBOLS,ARGV_OPTARG_NONE,0,0,0,
"list symbols found in the coff symbol table"},
+ {"strings", 's',TAG_STRINGS,ARGV_OPTARG_NONE,0,0,0,
+ "list strings found in the coff string table"},
+
{"expsyms", 'e',TAG_EXPSYMS,ARGV_OPTARG_NONE,0,0,0,
"list exported symbols" },