summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-14 04:27:18 -0500
committermidipix <writeonce@midipix.org>2017-12-14 11:36:09 -0500
commitee981e016f27efe4b1d5df027dc03accdd662cb0 (patch)
tree597ac0ca7cbb04a71240e4fc7eed073722c19df1
parentf5eb13ba3a0d8f1ef1e170e41b7491210b3028d3 (diff)
downloadperk-ee981e016f27efe4b1d5df027dc03accdd662cb0.tar.bz2
perk-ee981e016f27efe4b1d5df027dc03accdd662cb0.tar.xz
driver: added -d and -D (list mdso libs [and referenced symbols]).
-rw-r--r--include/perk/perk_output.h2
-rw-r--r--src/driver/pe_driver_ctx.c8
-rw-r--r--src/internal/perk_driver_impl.h2
-rw-r--r--src/skin/pe_skin_default.c7
4 files changed, 19 insertions, 0 deletions
diff --git a/include/perk/perk_output.h b/include/perk/perk_output.h
index dd080e9..a036ef9 100644
--- a/include/perk/perk_output.h
+++ b/include/perk/perk_output.h
@@ -13,6 +13,8 @@
#define PERK_OUTPUT_IMAGE_SECTIONS 0x00000010
#define PERK_OUTPUT_IMAGE_SYMBOLS 0x00000020
#define PERK_OUTPUT_IMAGE_STRINGS 0x00000040
+#define PERK_OUTPUT_MDSO_LIBS 0x00000200
+#define PERK_OUTPUT_MDSO_SYMS 0x00000400
/* pretty-printer flags */
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 36df61b..add9113 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -181,6 +181,14 @@ int pe_get_driver_ctx(
case TAG_IMPSYMS:
cctx.fmtflags |= PERK_OUTPUT_IMPORT_SYMS;
break;
+
+ case TAG_DSOLIBS:
+ cctx.fmtflags |= PERK_OUTPUT_MDSO_LIBS;
+ break;
+
+ case TAG_DSOSYMS:
+ cctx.fmtflags |= PERK_OUTPUT_MDSO_SYMS;
+ break;
}
} else
nunits++;
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h
index 6fe5513..25edf37 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -24,6 +24,8 @@ enum app_tags {
TAG_EXPSYMS,
TAG_IMPLIBS,
TAG_IMPSYMS,
+ TAG_DSOLIBS,
+ TAG_DSOSYMS,
};
struct pe_driver_ctx_impl {
diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c
index 95b2cfc..60663ea 100644
--- a/src/skin/pe_skin_default.c
+++ b/src/skin/pe_skin_default.c
@@ -33,5 +33,12 @@ const struct argv_option pe_default_options[] = {
"list .idata dependency libraries "
"along with imported symbols"},
+ {"dsolibs", 'd',TAG_DSOLIBS,ARGV_OPTARG_NONE,0,0,0,
+ "list .dsometa (mdso) dependency libraries"},
+
+ {"dsosyms", 'D',TAG_DSOSYMS,ARGV_OPTARG_NONE,0,0,0,
+ "list .dsometa (mdso) dependency libraries "
+ "along with referenced symbols"},
+
{0,0,0,0,0,0,0,0}
};