[lld] r250551 - [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:06:56 PDT 2015
Author: davide
Date: Fri Oct 16 16:06:55 2015
New Revision: 250551
URL: http://llvm.org/viewvc/llvm-project?rev=250551&view=rev
Log:
[ELF2/AArch64] Comment R_AARCH64_ADD_ABS_LO12_NC relocation.
Differential Revision: http://reviews.llvm.org/D13832
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=250551&r1=250550&r2=250551&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Fri Oct 16 16:06:55 2015
@@ -628,6 +628,10 @@ void AArch64TargetInfo::relocateOne(uint
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: {
More information about the llvm-commits
mailing list