From 5a8dbb7b4a0e1a457a084f6c20d17ce2232be2e9 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 16:49:26 +0000 Subject: fix(jit): leave LLJIT platform graphs out of __ImageBase aliasing Platform-support graphs carry __lljit.platform_support_instance and manage their own base; aliasing it there duplicates the symbol at materialization time and spoils the exit code. Co-Authored-By: Claude Fable 5.1 --- tools/driver/EmbeddedRunner.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/driver/EmbeddedRunner.cc b/tools/driver/EmbeddedRunner.cc index ca0a41c..d6d58db 100644 --- a/tools/driver/EmbeddedRunner.cc +++ b/tools/driver/EmbeddedRunner.cc @@ -157,6 +157,13 @@ public: G.findExternalSymbolByName(G.intern("__ImageBase")); if (!ImageBaseExt) return Error::success(); + // Platform graphs carry LLJIT-internal symbols; leave their + // own base alone or materialization sees it twice. + if (G.findDefinedSymbolByName( + G.intern("__lljit.platform_support_instance")) || + G.findExternalSymbolByName( + G.intern("__lljit.platform_support_instance"))) + return Error::success(); jitlink::Block *Low = nullptr; for (auto &Sec : G.sections()) { for (auto *B : Sec.blocks()) { -- cgit v1.3.1-4-g156e