summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-09-11 23:09:22 +0000
committerLang Hames <lhames@gmail.com>2014-09-11 23:09:22 +0000
commit6f8525d8a6c650d6dd75c029f731e72a916bdbb4 (patch)
treedd19e09cb60e4ab63446c3a39cc4f80ce3f0bb39 /llvm/lib/ExecutionEngine
parent196ac334f32f81d9fe040d51de4117c86c7087bf (diff)
downloadbcm5719-llvm-6f8525d8a6c650d6dd75c029f731e72a916bdbb4.tar.gz
bcm5719-llvm-6f8525d8a6c650d6dd75c029f731e72a916bdbb4.zip
[MCJIT] Improve the "stub not found" diagnostic in RuntimeDyldChecker.
A "stub found found" diagnostic is emitted when RuntimeDyldChecker's stub lookup logic fails to find the requested stub. The obvious reason for the failure is that no such stub has been created, but it can also fail for internal symbols if the symbol offset is not computed correctly (E.g. due to a mangled relocation addend). This patch adds a comment about the latter case so that it's not overlooked. Inspired by confusion experienced during test case construction for r217635. llvm-svn: 217643
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
index 49234f59b0b..dad02dca531 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
@@ -825,7 +825,10 @@ std::pair<uint64_t, std::string> RuntimeDyldCheckerImpl::getStubAddrFor(
auto StubOffsetItr = SymbolStubs.find(SymbolName);
if (StubOffsetItr == SymbolStubs.end())
return std::make_pair(0,
- ("Symbol '" + SymbolName + "' not found.\n").str());
+ ("Stub for symbol '" + SymbolName + "' not found. "
+ "If '" + SymbolName + "' is an internal symbol this "
+ "may indicate that the stub target offset is being "
+ "computed incorrectly.\n").str());
uint64_t StubOffset = StubOffsetItr->second;
OpenPOWER on IntegriCloud