[lld] r234144 - [AArch64] Fix error in AARCH64_ADR_GOT_PAGE handler

Denis Protivensky dprotivensky at accesssoftek.com
Mon Apr 6 00:44:59 PDT 2015


Author: denis-protivensky
Date: Mon Apr  6 02:44:59 2015
New Revision: 234144

URL: http://llvm.org/viewvc/llvm-project?rev=234144&view=rev
Log:
[AArch64] Fix error in AARCH64_ADR_GOT_PAGE handler

The error was introduced during mechanical replacement
of raw memory reads/writes to use readxxle/writexxle functions
in r230725.

Noted and fixed by Suprateeka R Hegde <hegdesmailbox at gmail.com>

Modified:
    lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp?rev=234144&r1=234143&r2=234144&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp Mon Apr  6 02:44:59 2015
@@ -223,7 +223,7 @@ static void relocR_AARCH64_ADR_GOT_PAGE(
         llvm::dbgs() << " immhi: " << Twine::utohexstr(immhi);
         llvm::dbgs() << " immlo: " << Twine::utohexstr(immlo);
         llvm::dbgs() << " result: " << Twine::utohexstr(result) << "\n");
-  write32le(location, result | read32le(location));
+  write32le(location, immlo | immhi | read32le(location));
 }
 
 // R_AARCH64_LD64_GOT_LO12_NC





More information about the llvm-commits mailing list