summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/amdgpu-relocs.s
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/ELF/amdgpu-relocs.s')
-rw-r--r--lld/test/ELF/amdgpu-relocs.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/lld/test/ELF/amdgpu-relocs.s b/lld/test/ELF/amdgpu-relocs.s
new file mode 100644
index 00000000000..6403ca9d6b5
--- /dev/null
+++ b/lld/test/ELF/amdgpu-relocs.s
@@ -0,0 +1,18 @@
+# RUN: llvm-mc -filetype=obj -triple=amdgcn--amdhsa -mcpu=fiji %s -o %t.o
+# RUN: ld.lld -shared %t.o -o %t.so
+# RUN: llvm-readobj -r %t.so | FileCheck %s
+
+# REQUIRES: amdgpu
+
+# Make sure that the reloc for local_var is resolved by lld.
+
+ .text
+
+kernel0:
+ s_mov_b32 s0, local_var+4
+ s_endpgm
+
+ .local local_var
+
+# CHECK: Relocations [
+# CHECK-NEXT: ]
OpenPOWER on IntegriCloud