[ELF] Refine isExported/isPreemptible condition
[llvm-project.git] / lld / test / ELF / archive-thin-missing-member.s
blob45fcd0e3caa23a64e56f23f3614ccbf55ef8e866
1 # REQUIRES: x86
2 # This test intentionally checks for fatal errors, and fatal errors aren't supported for testing when main is run twice.
3 # XFAIL: main-run-twice
5 # RUN: rm -f %t-no-syms.a
6 # RUN: rm -f %t-syms.a
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
8 # RUN: llvm-ar rcTS %t-no-syms.a %t.o
9 # RUN: llvm-ar rcT %t-syms.a %t.o
10 # RUN: rm %t.o
12 # Test error when loading symbols from missing thin archive member.
13 # RUN: not ld.lld --entry=_Z1fi %t-no-syms.a -o /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=ERR1
14 # ERR1: {{.*}}-no-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': [[MSG]]
16 # Test error when thin archive has symbol table but member is missing.
17 # RUN: not ld.lld --entry=_Z1fi -m elf_amd64_fbsd %t-syms.a -o /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=ERR2
18 # RUN: not ld.lld --entry=_Z1fi --no-demangle -m elf_amd64_fbsd %t-syms.a -o /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=ERR2
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 -DMSG=%errc_ENOENT %s --check-prefix=ERR2
22 # ERR2: {{.*}}-syms.a: could not get the buffer for a child of the archive: '{{.*}}.o': [[MSG]]
24 .global _Z1fi
25 _Z1fi:
26 nop