diff options
Diffstat (limited to 'lld/test')
-rw-r--r-- | lld/test/ELF/amdgpu-abi-version-err.s | 10 | ||||
-rw-r--r-- | lld/test/ELF/amdgpu-abi-version.s | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lld/test/ELF/amdgpu-abi-version-err.s b/lld/test/ELF/amdgpu-abi-version-err.s new file mode 100644 index 00000000000..a670ec75bf1 --- /dev/null +++ b/lld/test/ELF/amdgpu-abi-version-err.s @@ -0,0 +1,10 @@ +# REQUIRES: amdgpu +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s -o %t-0.o +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -mattr=-code-object-v3 -filetype=obj %s -o %t-1.o +# RUN: not ld.lld -shared %t-0.o %t-1.o -o %t.so 2>&1 | FileCheck %s + +# CHECK: ld.lld: error: incompatible ABI version: {{.*}}-1.o + +.text + s_nop 0x0 + s_endpgm diff --git a/lld/test/ELF/amdgpu-abi-version.s b/lld/test/ELF/amdgpu-abi-version.s new file mode 100644 index 00000000000..4a6bf2d8132 --- /dev/null +++ b/lld/test/ELF/amdgpu-abi-version.s @@ -0,0 +1,11 @@ +# REQUIRES: amdgpu +# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s -o %t.o +# RUN: ld.lld -shared %t.o -o %t.so +# RUN: llvm-readobj -file-headers %t.so | FileCheck %s + +# CHECK: OS/ABI: AMDGPU_HSA (0x40) +# CHECK: ABIVersion: 1 + +.text + s_nop 0x0 + s_endpgm |