Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / copy-errors.s
blob2c6f00c0e49790b95f9ec7591ae5f8703aee98fa
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/protected-shared.s -o %t2.o
4 // RUN: ld.lld %t2.o -o %t2.so -shared
5 // RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
7 // CHECK: error: cannot preempt symbol: bar
8 // CHECK: >>> defined in {{.*}}.so
9 // CHECK: >>> referenced by {{.*}}.o:(.text+0x1)
11 // CHECK: error: relocation R_X86_64_PC32 cannot be used against symbol 'zed'; recompile with -fPIC
12 // CHECK-NEXT: >>> defined in {{.*}}.so
13 // CHECK-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)
15 // RUN: ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck %s --check-prefix=NOINHIBIT
16 // NOINHIBIT: warning: cannot preempt symbol: bar
17 // NOINHIBIT-NEXT: >>> defined in {{.*}}.so
18 // NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x1)
19 // NOINHIBIT: warning: relocation R_X86_64_PC32 cannot be used against symbol 'zed'; recompile with -fPIC
20 // NOINHIBIT-NEXT: >>> defined in {{.*}}.so
21 // NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)
23 .global _start
24 _start:
25 .byte 0xe8
26 .long bar - .
27 .byte 0xe8
28 .long zed - .