aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/EmbeddedRunner.cc4
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)