36 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck -DFILE=%t.o %s4 5# CHECK: error: [[FILE]]:(.text+0x2): invalid prefix with R_X86_64_CODE_4_GOTTPOFF!6# CHECK-NEXT: error: [[FILE]]:(.text+0x8): invalid prefix with R_X86_64_CODE_6_GOTTPOFF!7# CHECK-NEXT: error: [[FILE]]:(.text+0x12): R_X86_64_CODE_4_GOTTPOFF must be used in MOVQ or ADDQ instructions only8# CHECK-NEXT: error: [[FILE]]:(.text+0x1a): R_X86_64_CODE_6_GOTTPOFF must be used in ADDQ instructions with NDD/NF/NDD+NF only9 10## These negative tests are to check if the invalid prefix and unsupported11## instructions for TLS relocation types with APX instructions are handled as12## errors.13 14.type tls0,@object15.section .tbss,"awT",@nobits16.globl tls017.align 418tls0:19 .long 020 .size tls0, 421 22.text23.globl _start24_start:25 addq 0(%rip), %rax, %r1626 .reloc .-4, R_X86_64_CODE_4_GOTTPOFF, tls0-427 28 movq 0(%rip), %r1629 .reloc .-4, R_X86_64_CODE_6_GOTTPOFF, tls0-430 31 andq 0(%rip), %r1632 .reloc .-4, R_X86_64_CODE_4_GOTTPOFF, tls0-433 34 andq 0(%rip), %rax, %r1635 .reloc .-4, R_X86_64_CODE_6_GOTTPOFF, tls0-436