From dbc4298c0a1f94eff4d52147284913ea0bce1997 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Thu, 2 Jul 2026 18:47:40 -0400 Subject: [PATCH] Export joltc.exe symbols so foreign-entry finds the embedded bundles The -e path worked but jolt build died: jolt_petite_boot_len wasn't foreign-entry-visible. -rdynamic's Windows equivalent for an exe is an export table; -Wl,--export-all-symbols provides one. --- host/chez/build-joltc.ss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/chez/build-joltc.ss b/host/chez/build-joltc.ss index 6151e22..bd4550e 100644 --- a/host/chez/build-joltc.ss +++ b/host/chez/build-joltc.ss @@ -245,6 +245,8 @@ ;; table so `build` can foreign-entry them to spill the bundled Chez boots. On ;; Linux dlsym can't see executable symbols otherwise (macOS exports them anyway). (bld-system (string-append - "cc -O2 " (if bld-nt? "" "-rdynamic ") "-I'" bld-csv-dir "' -I'" jb-build "' '" jb-main-c "' '" + ;; the embedded jolt_* arrays must be foreign-entry-visible at runtime: + ;; -rdynamic on ELF; on Windows an exe needs an export table (GetProcAddress). + "cc -O2 " (if bld-nt? "-Wl,--export-all-symbols " "-rdynamic ") "-I'" bld-csv-dir "' -I'" jb-build "' '" jb-main-c "' '" bld-csv-dir "/libkernel.a' -o '" jb-out "' " (bld-link-libs))) (display (string-append "build-joltc: wrote " jb-out "\n"))