diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-16 16:49:26 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-16 16:49:26 +0000 |
| commit | 5a8dbb7b4a0e1a457a084f6c20d17ce2232be2e9 (patch) | |
| tree | 215ff4afbcb456052e3c55940a26aaee5b11ed86 /tools/driver/EmbeddedRunner.cc | |
| parent | 131b1594781cc92806a66672010c3c097e30bf4f (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'tools/driver/EmbeddedRunner.cc')
| -rw-r--r-- | tools/driver/EmbeddedRunner.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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()) { |
