diff options
author | midipix <writeonce@midipix.org> | 2024-03-03 17:17:12 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-03 22:10:07 +0000 |
commit | b7e6e8e7c85853fa872201290dd880c8b53124b6 (patch) | |
tree | c251f3e9852d784753815991e5fc3197a97bbca3 /src/arbits | |
parent | 1769a44c3e2be2f6b309bef929a4d685072619b6 (diff) | |
download | slibtool-b7e6e8e7c85853fa872201290dd880c8b53124b6.tar.bz2 slibtool-b7e6e8e7c85853fa872201290dd880c8b53124b6.tar.xz |
slbt_ar_output_dlsyms(): properly handle the "@PROGRAM" special soname.
Diffstat (limited to 'src/arbits')
-rw-r--r-- | src/arbits/slbt_archive_dlsyms.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arbits/slbt_archive_dlsyms.c b/src/arbits/slbt_archive_dlsyms.c index 39555bd..e75ee3c 100644 --- a/src/arbits/slbt_archive_dlsyms.c +++ b/src/arbits/slbt_archive_dlsyms.c @@ -115,6 +115,7 @@ static int slbt_ar_output_dlsyms_impl( unsigned len; unsigned cmp; const char * arname; + const char * soname; struct slbt_archive_ctx * actx; struct slbt_archive_ctx ** parctx; struct slbt_archive_ctx_impl * ictx; @@ -215,13 +216,15 @@ static int slbt_ar_output_dlsyms_impl( "};\n\n") < 0) return SLBT_NESTED_ERROR(dctx); + soname = (strcmp(dsounit,"@PROGRAM@")) ? dsounit : "_PROGRAM_"; + if (slbt_dprintf(fdout, "/* dlsym vtable */\n" "extern const struct lt_dlsym_symdef " "lt_%s_LTX_preloaded_symbols[];\n\n" "const struct lt_dlsym_symdef " "lt_%s_LTX_preloaded_symbols[] = {\n", - dsounit,dsounit) < 0) + soname,soname) < 0) return SLBT_NESTED_ERROR(dctx); /* align dlsym_name and dlsym_addr columsn (because we can) */ |