From 907a62c236008b3562d72aa4cad0817869c113b8 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Fri, 13 Oct 2017 22:42:29 +0100 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