diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-16 16:44:36 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-16 16:44:36 +0000 |
| commit | bc9b82c7818df986385f6d0e7e29b7ed801566f7 (patch) | |
| tree | 63ac987794fcf0344074c26f98721e7e01d4e54e /tools | |
| parent | 8489d0bd3e0121e1d804da5139606dc6532b864f (diff) | |
fix(jit): only alias __ImageBase when purely external
LLJIT platform-support graphs define their own __ImageBase; aliasing it
again duplicates the symbol and corrupts materialization. Skip those.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/driver/EmbeddedRunner.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/driver/EmbeddedRunner.cc b/tools/driver/EmbeddedRunner.cc index 2bb7e3b..ddfb608 100644 --- a/tools/driver/EmbeddedRunner.cc +++ b/tools/driver/EmbeddedRunner.cc @@ -149,6 +149,10 @@ public: // external __ImageBase to the lowest defined block once addresses // are final; a trailing zero block would push RVAs negative. Config.PostAllocationPasses.push_back([](LinkGraph &G) -> Error { + // LLJIT platform-support graphs define their own __ImageBase; + // only alias it when it is purely external (our module graph). + if (G.findDefinedSymbolByName(G.intern("__ImageBase"))) + return Error::success(); auto *ImageBaseExt = G.findExternalSymbolByName(G.intern("__ImageBase")); if (!ImageBaseExt) |
