150
|
1 # REQUIRES: x86
|
|
2
|
|
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
|
|
5 # RUN: %p/Inputs/allow-shlib-undefined.s -o %t1.o
|
|
6 # RUN: ld.lld -shared %t1.o -o %t.so
|
|
7
|
|
8 # RUN: ld.lld --allow-shlib-undefined %t.o %t.so -o /dev/null
|
|
9 # RUN: not ld.lld --no-allow-shlib-undefined %t.o %t.so -o /dev/null 2>&1 | FileCheck %s
|
|
10 # Executable defaults to --no-allow-shlib-undefined
|
|
11 # RUN: not ld.lld %t.o %t.so -o /dev/null 2>&1 | FileCheck %s
|
|
12 # -shared defaults to --allow-shlib-undefined
|
|
13 # RUN: ld.lld -shared %t.o %t.so -o /dev/null
|
|
14
|
|
15 # RUN: echo | llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %tempty.o
|
|
16 # RUN: ld.lld -shared %tempty.o -o %tempty.so
|
|
17 # RUN: ld.lld -shared %t1.o %tempty.so -o %t2.so
|
|
18 # RUN: ld.lld --no-allow-shlib-undefined %t.o %t2.so -o /dev/null
|
|
19
|
|
20 # DSO with undefines:
|
|
21 # should link with or without any of these options.
|
|
22 # RUN: ld.lld -shared %t1.o -o /dev/null
|
|
23 # RUN: ld.lld -shared --allow-shlib-undefined %t1.o -o /dev/null
|
|
24 # RUN: ld.lld -shared --no-allow-shlib-undefined %t1.o -o /dev/null
|
|
25
|
|
26 .globl _start
|
|
27 _start:
|
|
28 callq _shared@PLT
|
|
29
|
|
30 # CHECK: undefined reference to _unresolved
|