[PATCH] D50657: Add R_HEX_32 relocation support

Sid Manning via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 11:54:22 PDT 2018


sidneym created this revision.
sidneym added reviewers: ruiu, bcain, kparzysz, shankare.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.

Add support for R_HEX_32 relocation.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50657

Files:
  ELF/Arch/Hexagon.cpp
  test/ELF/hexagon.s


Index: test/ELF/hexagon.s
===================================================================
--- test/ELF/hexagon.s
+++ test/ELF/hexagon.s
@@ -172,3 +172,8 @@
 # The rest:
 r1:0=combine(r2,##_start);
 # CHECK: 7302e000   	r1:0 = combine(r2,##69632) }
+
+# R_HEX_32:
+r_hex_32:
+.word _start
+# CHECK: 00011000
Index: ELF/Arch/Hexagon.cpp
===================================================================
--- ELF/Arch/Hexagon.cpp
+++ ELF/Arch/Hexagon.cpp
@@ -128,6 +128,9 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50657.160421.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180813/c993150a/attachment.bin>


More information about the llvm-commits mailing list