[PATCH] D47734: AMDGPU/LLD: Handle R_AMDGPU_REL64 relocation
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 14:47:24 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334444: AMDGPU/LLD: Handle R_AMDGPU_REL64 relocation (authored by kzhuravl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47734?vs=149819&id=150853#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47734
Files:
lld/trunk/ELF/Arch/AMDGPU.cpp
lld/trunk/test/ELF/amdgpu-relocs.s
Index: lld/trunk/test/ELF/amdgpu-relocs.s
===================================================================
--- lld/trunk/test/ELF/amdgpu-relocs.s
+++ lld/trunk/test/ELF/amdgpu-relocs.s
@@ -77,6 +77,15 @@
ptr2:
.quad temp2
+# R_AMDGPU_REL64:
+.type foo, @object
+.rodata
+ .globl foo
+ .p2align 3
+foo:
+ .quad temp2 at rel64
+ .size foo, 8
+
# The relocation for local_var{0, 1, 2} and var should be resolved by the
# linker.
# CHECK: Relocations [
@@ -101,6 +110,9 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
+# OBJDUMP: Contents of section .rodata:
+# OBJDUMP: 28fbffff ffffffff
+
# OBJDUMP: Contents of section nonalloc:
# OBJDUMP-NEXT: 0000 00000000 04480000 00000000 08440000
# OBJDUMP-NEXT: 00000000 0c400000
Index: lld/trunk/ELF/Arch/AMDGPU.cpp
===================================================================
--- lld/trunk/ELF/Arch/AMDGPU.cpp
+++ lld/trunk/ELF/Arch/AMDGPU.cpp
@@ -66,6 +66,7 @@
write32le(Loc, Val);
break;
case R_AMDGPU_ABS64:
+ case R_AMDGPU_REL64:
write64le(Loc, Val);
break;
case R_AMDGPU_GOTPCREL32_HI:
@@ -86,6 +87,7 @@
case R_AMDGPU_REL32:
case R_AMDGPU_REL32_LO:
case R_AMDGPU_REL32_HI:
+ case R_AMDGPU_REL64:
return R_PC;
case R_AMDGPU_GOTPCREL:
case R_AMDGPU_GOTPCREL32_LO:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47734.150853.patch
Type: text/x-patch
Size: 1270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/351b3075/attachment.bin>
More information about the llvm-commits
mailing list