[PATCH] D52909: Add R_HEX_GOT_16_X support

Sid Manning via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 8 08:34:40 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343972: [ELF][HEXAGON] Add R_HEX_GOT_16_X support (authored by sidneym, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D52909?vs=168391&id=168668#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D52909

Files:
  lld/trunk/ELF/Arch/Hexagon.cpp
  lld/trunk/test/ELF/hexagon-shared.s


Index: lld/trunk/test/ELF/hexagon-shared.s
===================================================================
--- lld/trunk/test/ELF/hexagon-shared.s
+++ lld/trunk/test/ELF/hexagon-shared.s
@@ -22,6 +22,9 @@
 r0 = memw (r2+##bar at GOT)
 jumpr r0
 
+# R_HEX_GOT_16_X
+r0 = add(r1,##bar at GOT)
+
 # PLT: { immext(#65472
 # PLT: r28 = add(pc,##65488) }
 # PLT: { r14 -= add(r28,#16)
@@ -37,6 +40,7 @@
 
 # TEXT:  10000: 00 00 02 00 00020000
 # TEXT: { 	call 0x10050 }
+# TEXT: r0 = add(r1,##65664) }
 
 # GOT: .got:
 # GOT: 30080:	00 00 00 00 00000000 <unknown>
Index: lld/trunk/ELF/Arch/Hexagon.cpp
===================================================================
--- lld/trunk/ELF/Arch/Hexagon.cpp
+++ lld/trunk/ELF/Arch/Hexagon.cpp
@@ -90,6 +90,7 @@
   case R_HEX_B32_PCREL_X:
     return R_PLT_PC;
   case R_HEX_GOT_11_X:
+  case R_HEX_GOT_16_X:
   case R_HEX_GOT_32_6_X:
     return R_HEXAGON_GOT;
   default:
@@ -191,7 +192,8 @@
   case R_HEX_12_X:
     or32le(Loc, applyMask(0x000007e0, Val));
     break;
-  case R_HEX_16_X: // This reloc only has 6 effective bits.
+  case R_HEX_16_X: // These relocs only have 6 effective bits.
+  case R_HEX_GOT_16_X:
     or32le(Loc, applyMask(findMaskR16(read32le(Loc)), Val & 0x3f));
     break;
   case R_HEX_32:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52909.168668.patch
Type: text/x-patch
Size: 1258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181008/bc7a22ce/attachment.bin>


More information about the llvm-commits mailing list