Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / invalid / bad-got-to-dylib-tlv-reference.s
blob463a0444651722c52b6ae254f2d9c867262bc049
1 # REQUIRES: x86
2 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libtlv.s -o %t/libtlv.o
5 # RUN: %lld -dylib -install_name @executable_path/libtlv.dylib \
6 # RUN: -lSystem -o %t/libtlv.dylib %t/libtlv.o
8 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
9 # RUN: not %lld -lSystem -L%t -ltlv -o /dev/null %t/test.o 2>&1 | FileCheck %s -DFILE=%t/test.o
11 # CHECK: error: [[FILE]]:(symbol _main+0x3): GOT_LOAD relocation requires that symbol _foo not be thread-local
13 #--- libtlv.s
14 .section __DATA,__thread_vars,thread_local_variables
15 .globl _foo
16 _foo:
18 #--- test.s
19 .text
20 .globl _main
21 _main:
22 movq _foo@GOTPCREL(%rip), %rax
23 ret