diff options
Diffstat (limited to 'src/arbits/slbt_archive_dlsyms.c')
-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) */ |