diff options
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 4 | ||||
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 25 |
2 files changed, 13 insertions, 16 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index fc242c0..b7c7b4c 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -885,6 +885,10 @@ int slbt_lib_get_driver_ctx( if (cctx.tag == SLBT_TAG_UNKNOWN) cctx.tag = SLBT_TAG_CC; + /* dlopen/dlpreopen: first vector member is a virtual archive */ + if (ndlopen) + ndlopen++; + /* driver context */ if (!(ctx = slbt_driver_ctx_alloc(fdctx,&cctx,&sargv,objlistv,envp,ndlopen))) return slbt_lib_get_driver_ctx_fail(0,meta); diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index af45a93..2e0dbbf 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -206,7 +206,6 @@ int slbt_ectx_get_exec_ctx( struct slbt_exec_ctx_impl * ictx; struct slbt_driver_ctx_impl * idctx; struct slbt_error_info** errinfp; - uint64_t fmask; char ** parg; char ** src; char ** dst; @@ -632,23 +631,17 @@ int slbt_ectx_get_exec_ctx( /* dlopen, dlpreopen */ if ((dlopenv = idctx->dlopenv), (dlactxv = ictx->dlactxv)) { - fmask = SLBT_DRIVER_DLPREOPEN_FORCE; - fmask |= SLBT_DRIVER_DLPREOPEN_SELF; - fmask |= SLBT_DRIVER_DLOPEN_FORCE; - - if (dctx->cctx->drvflags & fmask) { - if (slbt_ar_get_varchive_ctx(dctx,dlactxv) < 0) - return slbt_ectx_free_exec_ctx_impl( - ictx, - SLBT_NESTED_ERROR(dctx)); + if (slbt_ar_get_varchive_ctx(dctx,dlactxv) < 0) + return slbt_ectx_free_exec_ctx_impl( + ictx, + SLBT_NESTED_ERROR(dctx)); - if (slbt_ar_update_syminfo(*dlactxv,&ictx->ctx) < 0) - return slbt_ectx_free_exec_ctx_impl( - ictx, - SLBT_NESTED_ERROR(dctx)); + if (slbt_ar_update_syminfo(*dlactxv,&ictx->ctx) < 0) + return slbt_ectx_free_exec_ctx_impl( + ictx, + SLBT_NESTED_ERROR(dctx)); - dlactxv++; - } + dlactxv++; for (; *dlopenv; ) { dlentry = *dlopenv; |