[lld] r289277 - Add support for R_X86_64_GOT64.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 13:46:39 PST 2016
Author: rafael
Date: Fri Dec 9 15:46:39 2016
New Revision: 289277
URL: http://llvm.org/viewvc/llvm-project?rev=289277&view=rev
Log:
Add support for R_X86_64_GOT64.
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/test/ELF/relocation.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=289277&r1=289276&r2=289277&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Fri Dec 9 15:46:39 2016
@@ -611,6 +611,7 @@ RelExpr X86_64TargetInfo<ELFT>::getRelEx
case R_X86_64_PC64:
return R_PC;
case R_X86_64_GOT32:
+ case R_X86_64_GOT64:
return R_GOT_FROM_END;
case R_X86_64_GOTPCREL:
case R_X86_64_GOTPCRELX:
@@ -836,6 +837,7 @@ void X86_64TargetInfo<ELFT>::relocateOne
case R_X86_64_GLOB_DAT:
case R_X86_64_PC64:
case R_X86_64_SIZE64:
+ case R_X86_64_GOT64:
write64le(Loc, Val);
break;
default:
Modified: lld/trunk/test/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation.s?rev=289277&r1=289276&r2=289277&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation.s (original)
+++ lld/trunk/test/ELF/relocation.s Fri Dec 9 15:46:39 2016
@@ -132,3 +132,11 @@ R_X86_64_GOT32:
// CHECK: Contents of section .R_X86_64_GOT32:
// CHECK-NEXT: f8ffffff
+
+
+// CHECK: Contents of section .R_X86_64_GOT64:
+// CHECK-NEXT: f8ffffff ffffffff
+.section .R_X86_64_GOT64,"a", at progbits
+.global R_X86_64_GOT64
+R_X86_64_GOT64:
+ .quad zed at got
More information about the llvm-commits
mailing list