summaryrefslogtreecommitdiffstats
path: root/tools/lli
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-08-21 02:37:14 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-08-21 02:37:14 +0000
commit65566e1684043a41eed4376d7287254a1a12a458 (patch)
tree8a8c8d47cc2f02c9148b696f1a729306f8c44b62 /tools/lli
parent0856d3d9712c9fc515f014102e9f03f389555e75 (diff)
downloadexternal_llvm-65566e1684043a41eed4376d7287254a1a12a458.zip
external_llvm-65566e1684043a41eed4376d7287254a1a12a458.tar.gz
external_llvm-65566e1684043a41eed4376d7287254a1a12a458.tar.bz2
lli/RecordingMemoryManager.cpp: Make it complain if _GLOBAL_OFFSET_TABLE_ were not provided.
FIXME: Would it be responsible to provide GOT? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/RecordingMemoryManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lli/RecordingMemoryManager.cpp b/tools/lli/RecordingMemoryManager.cpp
index 1fa8176..ec55d2c 100644
--- a/tools/lli/RecordingMemoryManager.cpp
+++ b/tools/lli/RecordingMemoryManager.cpp
@@ -113,5 +113,12 @@ void *RecordingMemoryManager::getPointerToNamedFunction(const std::string &Name,
// is called before ExecutionEngine::runFunctionAsMain() is called.
if (Name == "__main") return (void*)(intptr_t)&jit_noop;
+ // FIXME: Would it be responsible to provide GOT?
+ if (AbortOnFailure) {
+ if (Name == "_GLOBAL_OFFSET_TABLE_")
+ report_fatal_error("Program used external function '" + Name +
+ "' which could not be resolved!");
+ }
+
return NULL;
}