diff options
author | midipix <writeonce@midipix.org> | 2024-02-22 13:40:56 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-22 13:47:14 +0000 |
commit | 752c02b178233ce8dbee73ebf4cab8a6759c8d12 (patch) | |
tree | b92781647aafab4c92f452edf59960e2613d4c13 /src/logic/linkcmd/slbt_linkcmd_dsolib.c | |
parent | 279932401cb1e799f2e8bdae7eae47b788c3001d (diff) | |
download | slibtool-752c02b178233ce8dbee73ebf4cab8a6759c8d12.tar.bz2 slibtool-752c02b178233ce8dbee73ebf4cab8a6759c8d12.tar.xz |
link mode: implemented -export-symbols-regex (for all supported flavors).
Diffstat (limited to 'src/logic/linkcmd/slbt_linkcmd_dsolib.c')
-rw-r--r-- | src/logic/linkcmd/slbt_linkcmd_dsolib.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_dsolib.c b/src/logic/linkcmd/slbt_linkcmd_dsolib.c index 00705a1..4d611a0 100644 --- a/src/logic/linkcmd/slbt_linkcmd_dsolib.c +++ b/src/logic/linkcmd/slbt_linkcmd_dsolib.c @@ -224,6 +224,26 @@ slbt_hidden int slbt_exec_link_create_library( } } + /* -export-symbols-regex; and see also: */ + /* slbt_exec_link_create_expsyms_archive() */ + if (dctx->cctx->regex) { + if (slbt_snprintf(mapfile,sizeof(mapfile), + "-Wl,%s", + ectx->mapfilename) < 0) + return SLBT_BUFFER_ERROR(dctx); + + if (slbt_host_group_is_darwin(dctx)) { + *ectx->explarg = "-Wl,-exported_symbols_list"; + *ectx->expsyms = mapfile; + + } else if (slbt_host_group_is_winnt(dctx)) { + *ectx->expsyms = mapfile; + } else { + *ectx->explarg = "-Wl,--version-script"; + *ectx->expsyms = mapfile; + } + } + /* shared/static */ if (dctx->cctx->drvflags & SLBT_DRIVER_ALL_STATIC) { *ectx->dpic = "-static"; |