From 920908352a6f13fec54c481fb38d982858366dff Mon Sep 17 00:00:00 2001 From: Eugene Leviant Date: Tue, 27 Dec 2016 09:51:38 +0000 Subject: RuntimeDyldELF: add R_AARCH64_ADD_ABS_LO12_NC reloc Differential revision: https://reviews.llvm.org/D28115 llvm-svn: 290598 --- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld') diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index a977dce06bb..fea932078c4 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -453,6 +453,15 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, support::ulittle32_t::ref{TargetPtr} = TargetValue; break; } + case ELF::R_AARCH64_ADD_ABS_LO12_NC: { + // Operation: S + A + uint64_t Result = Value + Addend; + + // Immediate goes in bits 21:10 of LD/ST instruction, taken + // from bits 11:0 of X + *TargetPtr |= ((Result & 0xfff) << 10); + break; + } case ELF::R_AARCH64_LDST32_ABS_LO12_NC: { // Operation: S + A uint64_t Result = Value + Addend; -- cgit v1.2.3