1# REQUIRES: x86 2 3# RUN: rm -f %t-no-syms.a 4# RUN: rm -f %t-syms.a 5# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 6# RUN: llvm-ar rcTS %t-no-syms.a %t.o 7# RUN: llvm-ar rcT %t-syms.a %t.o 8# RUN: rm %t.o 9 10# Test error when loading symbols from missing thin archive member. 11# RUN: not ld.lld --entry=_Z1fi %t-no-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1 12# ERR1: {{.*}}-no-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory 13 14# Test error when thin archive has symbol table but member is missing. 15# RUN: not ld.lld --entry=_Z1fi -m elf_amd64_fbsd %t-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2 16# ERR2: {{.*}}-syms.a: could not get the buffer for the member defining symbol f(int): '{{.*}}.o': {{[Nn]}}o such file or directory 17# RUN: not ld.lld --entry=_Z1fi --no-demangle -m elf_amd64_fbsd %t-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2MANGLE 18# ERR2MANGLE: {{.*}}-syms.a: could not get the buffer for the member defining symbol _Z1fi: '{{.*}}.o': {{[Nn]}}o such file or directory 19 20# Test error when thin archive is linked using --whole-archive but member is missing. 21# RUN: not ld.lld --entry=_Z1fi --whole-archive %t-syms.a -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3 22# ERR3: {{.*}}-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': {{[Nn]}}o such file or directory 23 24.global _Z1fi 25_Z1fi: 26 nop 27