[ELF][HEXAGON] Add R_HEX_32 support
authorSid Manning <sidneym@codeaurora.org>
Tue, 14 Aug 2018 13:52:38 +0000 (13:52 +0000)
committerSid Manning <sidneym@codeaurora.org>
Tue, 14 Aug 2018 13:52:38 +0000 (13:52 +0000)
Differential Revision: https://reviews.llvm.org/D50657

llvm-svn: 339677

lld/ELF/Arch/Hexagon.cpp
lld/test/ELF/hexagon.s

index 46d5040..8f323a4 100644 (file)
@@ -128,6 +128,9 @@ void Hexagon::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const {
   case R_HEX_12_X:
     or32le(Loc, applyMask(0x000007e0, Val));
     break;
+  case R_HEX_32:
+    or32le(Loc, applyMask(0xffffffff, Val));
+    break;
   case R_HEX_32_6_X:
     or32le(Loc, applyMask(0x0fff3fff, Val >> 6));
     break;
index b7e7383..bd4a77d 100644 (file)
@@ -172,3 +172,8 @@ memw(r0+#0) = ##_start
 # The rest:
 r1:0=combine(r2,##_start);
 # CHECK: 7302e000      r1:0 = combine(r2,##69632) }
+
+# R_HEX_32:
+r_hex_32:
+.word _start
+# CHECK: 00011000