summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorNathan Lanza <nathan@lanza.io>2018-12-12 00:04:06 +0000
committerNathan Lanza <nathan@lanza.io>2018-12-12 00:04:06 +0000
commit893083ae5e8e8ec8490b83e087a473c51b62f53f (patch)
treeff2d5f1a8af4888170d6985f96654dbc80b45768 /llvm/lib/ExecutionEngine
parente4a68d1df79287df9580974119d24d515e42d059 (diff)
downloadbcm5719-llvm-893083ae5e8e8ec8490b83e087a473c51b62f53f.tar.gz
bcm5719-llvm-893083ae5e8e8ec8490b83e087a473c51b62f53f.zip
Implement IMAGE_REL_AMD64_SECREL for RuntimeDyldCOFFX86_64
lldb on Windows uses the ExecutionEngine for expression evaluation and hits the llvm_unreachable due to this relocation. Thus, implement the relocation and add a test to verify it's function. llvm-svn: 348904
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
index 39bdc4b6921..aee5f6dc374 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
@@ -128,6 +128,13 @@ public:
break;
}
+ case COFF::IMAGE_REL_AMD64_SECREL: {
+ assert(static_cast<int64_t>(RE.Addend) <= INT32_MAX && "Relocation overflow");
+ assert(static_cast<int64_t>(RE.Addend) >= INT32_MIN && "Relocation underflow");
+ writeBytesUnaligned(RE.Addend, Target, 4);
+ break;
+ }
+
default:
llvm_unreachable("Relocation type not implemented yet!");
break;
OpenPOWER on IntegriCloud