summaryrefslogtreecommitdiffhomepage
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-03 02:14:41 +0000
committermidipix <writeonce@midipix.org>2024-03-03 02:26:51 +0000
commit25a7d0ed20e14cb983f758c6f54f8c418d27021b (patch)
treedb392a5b3c608dfbdb6150d5a95a3382901c0b99 /src/arbits
parent42187ca1ff9b4f320c7d821a35f05d64a3560a7f (diff)
downloadslibtool-25a7d0ed20e14cb983f758c6f54f8c418d27021b.tar.bz2
slibtool-25a7d0ed20e14cb983f758c6f54f8c418d27021b.tar.xz
slbt_ar_output_dlsyms(): null-terminate the dlsyms vtable.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_dlsyms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_dlsyms.c b/src/arbits/slbt_archive_dlsyms.c
index 5fd007c..39555bd 100644
--- a/src/arbits/slbt_archive_dlsyms.c
+++ b/src/arbits/slbt_archive_dlsyms.c
@@ -309,6 +309,10 @@ static int slbt_ar_output_dlsyms_impl(
return SLBT_NESTED_ERROR(dctx);
}
+ /* null-terminate the vtable */
+ if (slbt_dprintf(fdout,"\n\t{%d,%*c%d}\n",0,len,' ',0) < 0)
+ return SLBT_NESTED_ERROR(mctx->dctx);
+
/* close vtable, wrap translation unit */
if (slbt_dprintf(fdout,
"};\n\n"