From: LLVM Packaging Team Date: Fri, 22 Dec 2017 10:17:30 +0000 (+0000) Subject: fix-R_AARCH64_MOVW_UABS_G3-relocation X-Git-Tag: archive/raspbian/1%3.9.1-19+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a9a864cc2fe218fe59d11369e8b0b8d29e56c951;p=llvm-toolchain-3.9.git fix-R_AARCH64_MOVW_UABS_G3-relocation Gbp-Pq: Name fix-R_AARCH64_MOVW_UABS_G3-relocation.patch --- 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;