summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-23 00:01:19 +0000
committermidipix <writeonce@midipix.org>2024-02-23 00:11:48 +0000
commit5b42a87bbe5759edc5ed0ef494942dff48f61373 (patch)
tree32ebfeb1ae80510ad7592b5c9abd3730658ae378 /src/logic
parent77c7bc6d2a11ba719a8e3d384a35a8d12b97583b (diff)
downloadslibtool-5b42a87bbe5759edc5ed0ef494942dff48f61373.tar.bz2
slibtool-5b42a87bbe5759edc5ed0ef494942dff48f61373.tar.xz
link mode: regex: create a compatible export list for projects that expect it.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_argv.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c
index f062ae7..6ad75bb 100644
--- a/src/logic/linkcmd/slbt_linkcmd_argv.c
+++ b/src/logic/linkcmd/slbt_linkcmd_argv.c
@@ -608,6 +608,7 @@ static int slbt_exec_link_create_expsyms_archive(
dctx,
SLBT_ERR_FLOW_ERROR);
+ /* .expsyms.xxx --> .expsyms.a */
dot[1] = 'a';
dot[2] = '\0';
@@ -676,9 +677,26 @@ static int slbt_exec_link_create_expsyms_archive(
ectx->mapfilename,
0644);
+ /* .expsyms.a --> .exp */
+ if (ret == 0) {
+ *dot = '\0';
+
+ if ((dot = strrchr(output,'.'))) {
+ dot[1] = 'e';
+ dot[2] = 'x';
+ dot[3] = 'p';
+ dot[4] = '\0';
+
+ ret = slbt_ar_create_symfile(
+ arctx->meta,
+ output,
+ 0644);
+ }
+ }
+
slbt_ar_free_archive_ctx(arctx);
- return (ret < 0) ? SLBT_NESTED_ERROR(dctx) : 0;
+ return ((ret < 0) && dot) ? SLBT_NESTED_ERROR(dctx) : 0;
}