From d054ee34663b98b4387690f83ac4d836891f9743 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 9 Mar 2024 23:09:24 +0000 Subject: link mode: dlopen/dlpreopen the static archive as needed. --- src/logic/linkcmd/slbt_linkcmd_archive.c | 4 +++- src/logic/linkcmd/slbt_linkcmd_argv.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/logic/linkcmd') diff --git a/src/logic/linkcmd/slbt_linkcmd_archive.c b/src/logic/linkcmd/slbt_linkcmd_archive.c index 93237dd..5f1ba52 100644 --- a/src/logic/linkcmd/slbt_linkcmd_archive.c +++ b/src/logic/linkcmd/slbt_linkcmd_archive.c @@ -156,7 +156,9 @@ slbt_hidden int slbt_exec_link_create_archive( /* input objects associated with .la archives */ for (parg=ectx->cargv; *parg; parg++) - if (slbt_adjust_wrapper_argument(*parg,true)) + if (slbt_adjust_wrapper_argument( + *parg,true, + dctx->cctx->settings.arsuffix)) if (slbt_util_import_archive(ectx,output,*parg)) return SLBT_NESTED_ERROR(dctx); diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c index a0c342c..e50f6d9 100644 --- a/src/logic/linkcmd/slbt_linkcmd_argv.c +++ b/src/logic/linkcmd/slbt_linkcmd_argv.c @@ -170,7 +170,8 @@ slbt_hidden bool slbt_adjust_object_argument( slbt_hidden bool slbt_adjust_wrapper_argument( char * arg, - bool fpic) + bool fpic, + const char * suffix) { char * slash; char * dot; @@ -199,7 +200,7 @@ slbt_hidden bool slbt_adjust_wrapper_argument( dot = strrchr(arg,'.'); } - strcpy(dot,".a"); + strcpy(dot,suffix); return true; } -- cgit v1.2.3