[PATCH] D13832: [ELF2/AArch64] Comment R_AARCH64_ADD_ABS_LO12_NC relocation

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 14:09:06 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL250551: [ELF2/AArch64] Comment R_AARCH64_ADD_ABS_LO12_NC relocation. (authored by davide).

Changed prior to commit:
  http://reviews.llvm.org/D13832?vs=37638&id=37641#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13832

Files:
  lld/trunk/ELF/Target.cpp

Index: lld/trunk/ELF/Target.cpp
===================================================================
--- lld/trunk/ELF/Target.cpp
+++ lld/trunk/ELF/Target.cpp
@@ -628,6 +628,10 @@
     break;
   case R_AARCH64_ADD_ABS_LO12_NC:
     // No overflow check needed.
+    // This relocation stores 12 bits and there's no instruction
+    // to do it. Instead, we do a 32 bits store of the value
+    // of r_addend bitwise-or'ed L. This assumes that the addend
+    // bits in L are zero.
     or32le(L, (SA & 0xFFF) << 10);
     break;
   case R_AARCH64_ADR_PREL_LO21: {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13832.37641.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151016/80c93761/attachment.bin>


More information about the llvm-commits mailing list