[PATCH] D46247: [LLD][ELF][AArch64] Simplify relocations sharing same encoding [NFC]

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 06:03:23 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD331452: [LLD][AArch64] Simplify relocations sharing same encoding [NFC] (authored by psmith, committed by ).

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46247

Files:
  ELF/Arch/AArch64.cpp


Index: ELF/Arch/AArch64.cpp
===================================================================
--- ELF/Arch/AArch64.cpp
+++ ELF/Arch/AArch64.cpp
@@ -289,12 +289,6 @@
     checkInt(Loc, Val, 21, Type);
     or32le(Loc, (Val & 0x1FFFFC) << 3);
     break;
-  case R_AARCH64_LD64_GOT_LO12_NC:
-  case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
-  case R_AARCH64_TLSDESC_LD64_LO12:
-    checkAlignment(Loc, Val, 8, Type);
-    or32le(Loc, (Val & 0xFF8) << 7);
-    break;
   case R_AARCH64_LDST8_ABS_LO12_NC:
     or32AArch64Imm(Loc, getBits(Val, 0, 11));
     break;
@@ -307,6 +301,9 @@
     or32AArch64Imm(Loc, getBits(Val, 2, 11));
     break;
   case R_AARCH64_LDST64_ABS_LO12_NC:
+  case R_AARCH64_LD64_GOT_LO12_NC:
+  case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
+  case R_AARCH64_TLSDESC_LD64_LO12:
     checkAlignment(Loc, Val, 8, Type);
     or32AArch64Imm(Loc, getBits(Val, 3, 11));
     break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46247.145007.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/f4bbc315/attachment.bin>


More information about the llvm-commits mailing list