diff options
author | Lang Hames <lhames@gmail.com> | 2015-07-04 01:35:26 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-07-04 01:35:26 +0000 |
commit | 78937c2ae54cda926dba2ab2a3fa4346cd2e7940 (patch) | |
tree | a4ee7d8fe970470037c7a90bccde1358989cdb4c /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | |
parent | b0398827c201c74d4653580274e2650a6275b283 (diff) | |
download | bcm5719-llvm-78937c2ae54cda926dba2ab2a3fa4346cd2e7940.tar.gz bcm5719-llvm-78937c2ae54cda926dba2ab2a3fa4346cd2e7940.zip |
[RuntimeDyld] Skip relocations for external symbols with 64-bit address ~0ULL.
Requested by Eugene Rozenfeld of the LLILC team, this feature allows JIT
clients to skip relocations for selected external symbols by returning ~0ULL
from their symbol resolver. If this value is returned for a given symbol,
RuntimeDyld will skip all relocations for that symbol. The client will be
responsible for applying the skipped relocations manually before the code
is executed.
llvm-svn: 241383
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 957571b092d..ae199b72022 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -727,7 +727,9 @@ bool RuntimeDyldCheckerImpl::checkAllRulesInBuffer(StringRef RulePrefix, } bool RuntimeDyldCheckerImpl::isSymbolValid(StringRef Symbol) const { - return getRTDyld().getSymbolLocalAddress(Symbol) != nullptr; + if (getRTDyld().getSymbolLocalAddress(Symbol)) + return true; + return !!getRTDyld().Resolver.findSymbol(Symbol); } uint64_t RuntimeDyldCheckerImpl::getSymbolLocalAddr(StringRef Symbol) const { |