20 lines · plain
1# REQUIRES: x862# Check that we fall back to search paths if a linker script was not found3# This behaviour matches ld.bfd and various projects appear to rely on this4 5# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o6# RUN: rm -rf %t.dir && mkdir -p %t.dir7# RUN: echo 'OUTPUT("%t.out")' > %t.dir/script8# RUN: ld.lld -T%t.dir/script %t.o9# RUN: llvm-readobj %t.out | FileCheck %s10# CHECK: Format: elf64-x86-6411 12# If the linker script specified with -T is missing we should emit an error13# RUN: not ld.lld -Tscript %t.o 2>&1 | FileCheck %s -check-prefix ERROR14# ERROR: error: cannot find linker script {{.*}}script15 16# But if it exists in the search path we should fall back to that instead:17# RUN: rm %t.out18# RUN: ld.lld -L %t.dir -Tscript %t.o19# RUN: llvm-readobj %t.out | FileCheck %s20