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# RUN: ld.lld %t.o %t.so --noinhibit-exec -o /dev/null 2>&1 | FileCheck %s 13# -shared defaults to --allow-shlib-undefined 14# RUN: ld.lld -shared %t.o %t.so -o /dev/null 15 16# RUN: echo | llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %tempty.o 17# RUN: ld.lld -shared %tempty.o -o %tempty.so 18# RUN: ld.lld -shared %t1.o %tempty.so -o %t2.so 19# RUN: ld.lld --no-allow-shlib-undefined %t.o %t2.so -o /dev/null 20 21# DSO with undefines: 22# should link with or without any of these options. 23# RUN: ld.lld -shared %t1.o -o /dev/null 24# RUN: ld.lld -shared --allow-shlib-undefined %t1.o -o /dev/null 25# RUN: ld.lld -shared --no-allow-shlib-undefined %t1.o -o /dev/null 26 27.globl _start 28_start: 29 callq _shared@PLT 30 31# CHECK: {{.*}}.so: undefined reference to _unresolved [--no-allow-shlib-undefined] 32