From 25a7d0ed20e14cb983f758c6f54f8c418d27021b Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 3 Mar 2024 02:14:41 +0000 Subject: slbt_ar_output_dlsyms(): null-terminate the dlsyms vtable. --- src/arbits/slbt_archive_dlsyms.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arbits') 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" -- cgit v1.2.3