Rafael Espindola | a85efd9 | 2016-04-30 01:15:17 +0000 | [diff] [blame] | 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 | |
Rui Ueyama | 6ea7252 | 2017-04-03 21:36:31 +0000 | [diff] [blame] | 7 | // CHECK: cannot preempt symbol: bar |
| 8 | // CHECK: >>> defined in {{.*}}.so |
| 9 | // CHECK: >>> referenced by {{.*}}.o:(.text+0x1) |
Rafael Espindola | 7c99c14 | 2018-01-03 22:44:58 +0000 | [diff] [blame] | 10 | |
| 11 | // CHECK: error: symbol 'zed' has no type |
| 12 | // CHECK-NEXT: >>> defined in {{.*}}.so |
| 13 | // CHECK-NEXT: >>> referenced by {{.*}}.o:(.text+0x6) |
Rui Ueyama | 6ea7252 | 2017-04-03 21:36:31 +0000 | [diff] [blame] | 14 | |
George Rimar | 84941ef | 2017-07-26 09:46:59 +0000 | [diff] [blame] | 15 | // RUN: not ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck %s --check-prefix=NOINHIBIT |
Rafael Espindola | 7c99c14 | 2018-01-03 22:44:58 +0000 | [diff] [blame] | 16 | // NOINHIBIT: warning: symbol 'zed' has no type |
| 17 | // NOINHIBIT-NEXT: >>> defined in {{.*}}.so |
| 18 | // NOINHIBIT-NEXT: >>> referenced by {{.*}}.o:(.text+0x6) |
George Rimar | 84941ef | 2017-07-26 09:46:59 +0000 | [diff] [blame] | 19 | |
Rafael Espindola | a85efd9 | 2016-04-30 01:15:17 +0000 | [diff] [blame] | 20 | .global _start |
| 21 | _start: |
Rafael Espindola | f931c17 | 2018-02-16 20:05:58 +0000 | [diff] [blame] | 22 | .byte 0xe8 |
| 23 | .long bar - . |
| 24 | .byte 0xe8 |
| 25 | .long zed - . |