[PATCH] D27307: ELF/AArch64: Simplify R_AARCH64_ADD_ABS_LO12_NC relocation
Adhemerval Zanella via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 10:05:11 PST 2016
zatrazz created this revision.
zatrazz added reviewers: ruiu, rafael, rengolin.
zatrazz added a subscriber: llvm-commits.
zatrazz set the repository for this revision to rL LLVM.
zatrazz added a project: lld.
Herald added a subscriber: aemerson.
This patch uses the updateAArch64Add on relocation apply and remove
the comment.
Repository:
rL LLVM
https://reviews.llvm.org/D27307
Files:
ELF/Target.cpp
Index: ELF/Target.cpp
===================================================================
--- ELF/Target.cpp
+++ ELF/Target.cpp
@@ -1337,11 +1337,7 @@
write64le(Loc, Val);
break;
case R_AARCH64_ADD_ABS_LO12_NC:
- // 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 Loc. This assumes that the addend
- // bits in Loc are zero.
- or32le(Loc, (Val & 0xFFF) << 10);
+ updateAArch64Add(Loc, Val);
break;
case R_AARCH64_ADR_GOT_PAGE:
case R_AARCH64_ADR_PREL_PG_HI21:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27307.79939.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/8606dfb3/attachment.bin>
More information about the llvm-commits
mailing list