summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/mdso_driver_ctx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c
index 5dd9449..75e44c8 100644
--- a/src/driver/mdso_driver_ctx.c
+++ b/src/driver/mdso_driver_ctx.c
@@ -174,14 +174,18 @@ int mdso_get_driver_ctx(
if (!(meta = argv_get(argv,optv,mdso_argv_flags(flags))))
return -1;
+ /* cctx init, option defaults */
+ memset(&cctx,0,sizeof(cctx));
+
nunits = 0;
pretty = 0;
implib = 0;
asmbase = 0;
fddst = -1;
program = argv_program_name(argv[0]);
- memset(&cctx,0,sizeof(cctx));
+
cctx.drvflags = flags;
+ cctx.dsoflags = MDSO_FLAG_LOADER_PATH;
if (!argv[1] && (flags & MDSO_DRIVER_VERBOSITY_USAGE))
return mdso_driver_usage(program,0,optv,meta);
@@ -303,6 +307,9 @@ int mdso_create_driver_ctx(
if (!(ctx = mdso_driver_ctx_alloc(meta,cctx,0)))
return mdso_get_driver_ctx_fail(meta,0,0,fddst);
+ if (!ctx->cctx.dsoflags)
+ ctx->cctx.dsoflags = MDSO_FLAG_LOADER_PATH;
+
ctx->ctx.cctx = &ctx->cctx;
*pctx = &ctx->ctx;
return MDSO_OK;