From: Lang Hames Date: Thu, 11 Sep 2014 23:09:22 +0000 (+0000) Subject: [MCJIT] Improve the "stub not found" diagnostic in RuntimeDyldChecker. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=264a325a90f7b397b8c9ff954080ffc73c9e2483;p=oota-llvm.git [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217643 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 49234f59b0b..dad02dca531 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -825,7 +825,10 @@ std::pair 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;