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

Denis Protivensky dprotivensky at accesssoftek.com
Mon Apr 6 23:28:19 PDT 2015


Yep, the original author of the fix claimed he'd write the test case soon. I obviously don't know how to properly test this, and I applied the fix just because I was able to diff with previous changes and find that there was an error. It's still better than nothing.

On 04/06/2015 08:32 PM, Rui Ueyama wrote:
It'd be nice if we can test this?

On Mon, Apr 6, 2015 at 12:44 AM, Denis Protivensky <dprotivensky at accesssoftek.com<mailto:dprotivensky at accesssoftek.com>> wrote:
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<mailto: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


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150406/75564235/attachment.html>


More information about the llvm-commits mailing list