[lld] r249627 - [ELF2/AArch64] _ABS* relocations don't read contents. Fix it.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 15:10:02 PDT 2015


Author: davide
Date: Wed Oct  7 17:10:02 2015
New Revision: 249627

URL: http://llvm.org/viewvc/llvm-project?rev=249627&view=rev
Log:
[ELF2/AArch64] _ABS* relocations don't read contents. Fix it.

Spotted by: Rafael Espindola.

Modified:
    lld/trunk/ELF/Target.cpp

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=249627&r1=249626&r2=249627&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Oct  7 17:10:02 2015
@@ -299,16 +299,16 @@ void AArch64TargetInfo::relocateOne(uint
   case R_AARCH64_ABS16:
     if (!isInt<16>(S + A))
       error("Relocation R_AARCH64_ABS16 out of range");
-    or16le(L, S + A);
+    write16le(L, S + A);
     break;
   case R_AARCH64_ABS32:
     if (!isInt<32>(S + A))
       error("Relocation R_AARCH64_ABS32 out of range");
-    or32le(L, S + A);
+    write32le(L, S + A);
     break;
   case R_AARCH64_ABS64:
     // No overflow check needed.
-    or64le(L, S + A);
+    write64le(L, S + A);
     break;
   case R_AARCH64_ADD_ABS_LO12_NC:
     // No overflow check needed.




More information about the llvm-commits mailing list