From: LLVM Packaging Team Date: Sun, 18 Jun 2017 17:12:15 +0000 (+0100) Subject: fix-R_AARCH64_MOVW_UABS_G3-relocation X-Git-Tag: archive/raspbian/1%5.0_+rc2-1+rpi1~2^2~4^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cfa6eb16e151840d7a99df1d8583aab9b2233e82;p=llvm-toolchain-5.0.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 9cbdb13a3..9a347fe33 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;