[ELF] Refine isExported/isPreemptible condition
[llvm-project.git] / lld / test / ELF / start-lib.s
blob5bd0bd628bf3fe9a1492359d0f900bfde512b09f
1 // REQUIRES: x86
3 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
4 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
5 // RUN: %p/Inputs/start-lib1.s -o %t2.o
6 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
7 // RUN: %p/Inputs/start-lib2.s -o %t3.o
8 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
9 // RUN: %p/Inputs/eager.s -o %t-eager.o
11 // RUN: ld.lld -o %t3 %t1.o %t2.o %t3.o %t-eager.o
12 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST1 %s
13 // TEST1: Name: foo
14 // TEST1: Name: bar
16 // RUN: ld.lld -o %t3 %t1.o -u bar --start-lib %t2.o %t3.o %t-eager.o
17 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST2 %s
18 // TEST2-NOT: Name: foo
19 // TEST2: Name: bar
21 // RUN: ld.lld -o %t3 %t1.o --start-lib %t2.o %t3.o %t-eager.o
22 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST3 %s
23 // TEST3-NOT: Name: foo
24 // TEST3-NOT: Name: bar
26 // RUN: not ld.lld %t1.o --start-lib --start-lib 2>&1 | FileCheck -check-prefix=NESTED-LIB %s
27 // NESTED-LIB: nested --start-lib
29 // RUN: not ld.lld %t1.o --start-group --start-lib 2>&1 | FileCheck -check-prefix=LIB-IN-GROUP %s
30 // LIB-IN-GROUP: may not nest --start-lib in --start-group
32 // RUN: not ld.lld --end-lib 2>&1 | FileCheck -check-prefix=END %s
33 // END: stray --end-lib
35 .globl _start
36 _start:
37 callq eager