]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/copy-errors.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / copy-errors.s
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 %t 2>&1 | FileCheck %s
6
7 // CHECK: cannot preempt symbol: bar
8 // CHECK: >>> defined in {{.*}}.so
9 // CHECK: >>> referenced by {{.*}}.o:(.text+0x1)
10
11 // CHECK: error: symbol 'zed' has no type
12 // CHECK-NEXT: >>> defined in {{.*}}.so
13 // CHECK-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)
14
15 // RUN: not ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck %s --check-prefix=NOINHIBIT
16 // NOINHIBIT: warning: symbol 'zed' has no type
17 // NOINHIBIT-NEXT: >>> defined in {{.*}}.so
18 // NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x6)
19
20 .global _start
21 _start:
22 .byte 0xe8
23 .long bar - .
24 .byte 0xe8
25 .long zed - .