From df310646d891f9f5c20c0cb8449ed4a61ad21f48 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 5 Dec 2016 14:15:03 +0000 Subject: [PATCH] ELF/AArch64: Simplify R_AARCH64_ADD_ABS_LO12_NC relocation This patch uses the updateAArch64Add on relocation apply and remove the comment. llvm-svn: 288669 --- lld/ELF/Target.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index c72d46a..6e4a180 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -1349,11 +1349,7 @@ void AArch64TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, 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: -- 2.7.4