summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-10-14 19:36:24 -0400
committermidipix <writeonce@midipix.org>2017-10-14 19:36:24 -0400
commit0dba1c70bb1a6e6373a418b50261c60e004c90a4 (patch)
tree0bf080d0d50d4e1c8f2fd1a7af54315b0185b166 /src
parent7f570254048637664ec2c077689381a4c0db0ab1 (diff)
downloadmdso-0dba1c70bb1a6e6373a418b50261c60e004c90a4.tar.bz2
mdso-0dba1c70bb1a6e6373a418b50261c60e004c90a4.tar.xz
driver: properly set a the loader path default.
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;