kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

commit 4bbf87e038f9528f4ce83aeab3f9a34a9a7bdbf5
parent d9a2df70ba7107d12724d4e08218c5d2a8d9c3af
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Mon,  1 Jun 2026 10:12:09 -0700

test: link x64-dbg test against LIB_OBJS, not the archive

test-x64-dbg failed to link with an undefined _arch_lookup. The test
reaches the internal arch/arch.h surface (arch_lookup, ArchDbgOps), but
its recipe linked $(LIB_AR). libcfree.a is built by merging the
-fvisibility=hidden objects through a single ld -r relocatable object,
which localizes every non-public symbol, so the archive can't satisfy
internal references.

Switch to $(LIB_OBJS), matching the aa64/rv64 arch unit tests. This was
the lone arch test still on the archive, overlooked when the relocatable
export-enforcement merge (d79afab) landed.

Diffstat:
Mtest/test.mk | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/test.mk b/test/test.mk @@ -460,9 +460,12 @@ X64_DBG_TEST_BIN = build/test/x64_dbg_test test-x64-dbg: $(X64_DBG_TEST_BIN) $(X64_DBG_TEST_BIN) -$(X64_DBG_TEST_BIN): test/arch/x64_dbg_test.c $(LIB_AR) +# Reaches the internal arch/arch.h surface (arch_lookup, ArchDbgOps) -> links +# $(LIB_OBJS), not the archive, whose relocatable merge localizes non-public +# symbols (mirrors the aa64/rv64 arch unit tests above). +$(X64_DBG_TEST_BIN): test/arch/x64_dbg_test.c $(LIB_OBJS) @mkdir -p $(dir $@) - $(CC) $(TEST_HOST_CFLAGS) -Isrc test/arch/x64_dbg_test.c $(LIB_AR) -o $@ + $(CC) $(TEST_HOST_CFLAGS) -Isrc test/arch/x64_dbg_test.c $(LIB_OBJS) -o $@ RT_HEADER_TEST_TARGETS = \ aarch64-linux-gnu \