summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c2
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_executable.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 6737815..9479e54 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -788,10 +788,12 @@ int slbt_lib_get_driver_ctx(
case TAG_SHARED:
cmdshared = entry;
+ cctx.drvflags |= SLBT_DRIVER_PREFER_SHARED;
break;
case TAG_STATIC:
cmdstatic = entry;
+ cctx.drvflags |= SLBT_DRIVER_PREFER_STATIC;
break;
case TAG_WEAK:
diff --git a/src/logic/linkcmd/slbt_linkcmd_executable.c b/src/logic/linkcmd/slbt_linkcmd_executable.c
index 76c0b1d..a1f8b1c 100644
--- a/src/logic/linkcmd/slbt_linkcmd_executable.c
+++ b/src/logic/linkcmd/slbt_linkcmd_executable.c
@@ -100,7 +100,8 @@ slbt_hidden int slbt_exec_link_create_executable(
fdcwd = slbt_driver_fdcwd(dctx);
/* fpic */
- fpic = (dctx->cctx->drvflags & SLBT_DRIVER_SHARED);
+ fpic = (dctx->cctx->drvflags & SLBT_DRIVER_SHARED);
+ fpic &= !(dctx->cctx->drvflags & SLBT_DRIVER_PREFER_STATIC);
/* input argument adjustment */
for (parg=ectx->cargv; *parg; parg++)