summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/mdso_driver_ctx.c10
-rw-r--r--src/skin/mdso_skin_default.c17
2 files changed, 19 insertions, 8 deletions
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c
index ef08600..c7950d5 100644
--- a/src/driver/mdso_driver_ctx.c
+++ b/src/driver/mdso_driver_ctx.c
@@ -21,6 +21,7 @@
#include "argv/argv.h"
#define MDSO_LOADER_FLAGS_MASK (MDSO_FLAG_LOADER_PATH \
+ | MDSO_FLAG_LDSO_LIB \
| MDSO_FLAG_PEB_PATH \
| MDSO_FLAG_SYSTEM32)
@@ -234,9 +235,14 @@ int mdso_get_driver_ctx(
if (!(strcmp(entry->arg,"loader")))
cctx.dsoflags |= MDSO_FLAG_LOADER_PATH;
- if (!(strcmp(entry->arg,"peb")))
+
+ else if (!(strcmp(entry->arg,"ldso")))
+ cctx.dsoflags |= MDSO_FLAG_LDSO_LIB;
+
+ else if (!(strcmp(entry->arg,"peb")))
cctx.dsoflags |= MDSO_FLAG_PEB_PATH;
- if (!(strcmp(entry->arg,"system32")))
+
+ else if (!(strcmp(entry->arg,"system32")))
cctx.dsoflags |= MDSO_FLAG_SYSTEM32;
break;
diff --git a/src/skin/mdso_skin_default.c b/src/skin/mdso_skin_default.c
index 4145696..0c3fd85 100644
--- a/src/skin/mdso_skin_default.c
+++ b/src/skin/mdso_skin_default.c
@@ -23,12 +23,17 @@ const struct argv_option mdso_default_options[] = {
{"machine", 'm',TAG_QUAD_PTR,ARGV_OPTARG_REQUIRED,0,"32|64",0,
"set machine bits to %s"},
- {"libpath", 'l',TAG_LIBPATH,ARGV_OPTARG_REQUIRED,0,"loader|peb|system32",0,
- "runtime loader should search for the library either "
- "according to its internal/inherited path (loader), "
- "or according to the library path in the process PEB block (peb); "
- "alternatively, the loader may only search for the library "
- "in the system library directory (system32)."},
+ {"libpath", 'l',TAG_LIBPATH,ARGV_OPTARG_REQUIRED,0,
+ "loader|ldso|peb|system32",0,
+ "indicate that this is the runtime loader "
+ "itself (ldso); otherwise, specify that the "
+ "runtime loader should search for the library "
+ "either according to its internal/inherited "
+ "path (loader), or according to the library "
+ "path in the process PEB block (peb); "
+ "alternatively, the loader may only search "
+ "for the library in the system library "
+ "directory (system32)."},
{"dstdir", 'd',TAG_DSTDIR,ARGV_OPTARG_REQUIRED,0,0,"<dstdir>",
"save generated assembly files under %s"},