]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/version-script-complex-wildcards.s
Vendor import of lld trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / ELF / version-script-complex-wildcards.s
1 # REQUIRES: x86
2
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "FOO { global: extern \"C++\" { ab[c]*; }; };" > %t.script
5 # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
6 # RUN: llvm-readobj -V %t.so | FileCheck %s --check-prefix=ABC
7 # ABC: Name: _Z3abbi
8 # ABC: Name: _Z3abci@@FOO
9
10 # RUN: echo "FOO { global: extern \"C++\" { ab[b]*; }; };" > %t1.script
11 # RUN: ld.lld --version-script %t1.script -shared %t.o -o %t1.so
12 # RUN: llvm-readobj -V %t1.so | FileCheck %s --check-prefix=ABB
13 # ABB: Name: _Z3abbi@@FOO
14 # ABB: Name: _Z3abci
15
16 # RUN: echo "FOO { global: extern \"C++\" { ab[a-b]*; }; };" > %t2.script
17 # RUN: ld.lld --version-script %t2.script -shared %t.o -o %t2.so
18 # RUN: llvm-readobj -V %t2.so | FileCheck %s --check-prefix=ABB
19
20 # RUN: echo "FOO { global: extern \"C++\" { ab[a-c]*; }; };" > %t3.script
21 # RUN: ld.lld --version-script %t3.script -shared %t.o -o %t3.so
22 # RUN: llvm-readobj -V %t3.so | FileCheck %s --check-prefix=ABBABC
23 # ABBABC: Name: _Z3abbi@@FOO
24 # ABBABC: Name: _Z3abci@@FOO
25
26 # RUN: echo "FOO { global: extern \"C++\" { ab[a-bc-d]*; }; };" > %t4.script
27 # RUN: ld.lld --version-script %t4.script -shared %t.o -o %t4.so
28 # RUN: llvm-readobj -V %t4.so | FileCheck %s --check-prefix=ABBABC
29
30 # RUN: echo "FOO { global: extern \"C++\" { ab[a-bd-e]*; }; };" > %t5.script
31 # RUN: ld.lld --version-script %t5.script -shared %t.o -o %t5.so
32 # RUN: llvm-readobj -V %t5.so | FileCheck %s --check-prefix=ABB
33
34 # RUN: echo "FOO { global: extern \"C++\" { ab[^a-c]*; }; };" > %t6.script
35 # RUN: ld.lld --version-script %t6.script -shared %t.o -o %t6.so
36 # RUN: llvm-readobj -V %t6.so | FileCheck %s --check-prefix=NO
37 # NO:  Name: _Z3abbi
38 # NO:  Name: _Z3abci
39
40 # RUN: echo "FOO { global: extern \"C++\" { ab[^c-z]*; }; };" > %t7.script
41 # RUN: ld.lld --version-script %t7.script -shared %t.o -o %t7.so
42 # RUN: llvm-readobj -V %t7.so | FileCheck %s --check-prefix=ABB
43
44 # RUN: echo "FOO { global: extern \"C++\" { a[x-za-b][a-c]*; }; };" > %t8.script
45 # RUN: ld.lld --version-script %t8.script -shared %t.o -o %t8.so
46 # RUN: llvm-readobj -V %t8.so | FileCheck %s --check-prefix=ABBABC
47
48 # RUN: echo "FOO { global: extern \"C++\" { a[; }; };" > %t9.script
49 # RUN: not ld.lld --version-script %t9.script -shared %t.o -o /dev/null 2>&1 \
50 # RUN:   | FileCheck %s --check-prefix=ERROR
51 # ERROR: invalid glob pattern: a[
52
53 .text
54 .globl _Z3abci
55 .type _Z3abci,@function
56 _Z3abci:
57 retq
58
59 .globl _Z3abbi
60 .type _Z3abbi,@function
61 _Z3abbi:
62 retq