From 6cb8a21c5135b08c6f9ac742bff3925c7183db6f Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Fri, 2 Jun 2017 13:14:18 +0000 Subject: [PATCH] fix-R_AARCH64_MOVW_UABS_G3-relocation Gbp-Pq: Name fix-R_AARCH64_MOVW_UABS_G3-relocation.patch --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 9cbdb13a..9a347fe3 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -357,7 +357,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, // bits affected by the relocation on entry is garbage. *TargetPtr &= 0xffe0001fU; // Immediate goes in bits 20:5 of MOVZ/MOVK instruction - *TargetPtr |= Result >> (48 - 5); + *TargetPtr |= (Result & 0xffff000000000000ULL) >> (48 - 5); // Shift must be "lsl #48", in bits 22:21 assert((*TargetPtr >> 21 & 0x3) == 3 && "invalid shift for relocation"); break; -- 2.30.2