2016-09-07 18:19:44 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[c]*; }; };" > %t.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
|
|
|
|
# RUN: llvm-readobj -V %t.so | FileCheck %s --check-prefix=ABC
|
2019-01-08 18:50:59 +08:00
|
|
|
# ABC: Name: _Z3abbi
|
2016-09-08 04:50:41 +08:00
|
|
|
# ABC: Name: _Z3abci@@FOO
|
2016-09-07 18:19:44 +08:00
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[b]*; }; };" > %t1.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t1.script -shared %t.o -o %t1.so
|
|
|
|
# RUN: llvm-readobj -V %t1.so | FileCheck %s --check-prefix=ABB
|
2016-09-08 04:50:41 +08:00
|
|
|
# ABB: Name: _Z3abbi@@FOO
|
2019-01-08 18:50:59 +08:00
|
|
|
# ABB: Name: _Z3abci
|
2016-09-07 18:19:44 +08:00
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[a-b]*; }; };" > %t2.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t2.script -shared %t.o -o %t2.so
|
|
|
|
# RUN: llvm-readobj -V %t2.so | FileCheck %s --check-prefix=ABB
|
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[a-c]*; }; };" > %t3.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t3.script -shared %t.o -o %t3.so
|
|
|
|
# RUN: llvm-readobj -V %t3.so | FileCheck %s --check-prefix=ABBABC
|
2016-09-08 04:50:41 +08:00
|
|
|
# ABBABC: Name: _Z3abbi@@FOO
|
|
|
|
# ABBABC: Name: _Z3abci@@FOO
|
2016-09-07 18:19:44 +08:00
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[a-bc-d]*; }; };" > %t4.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t4.script -shared %t.o -o %t4.so
|
|
|
|
# RUN: llvm-readobj -V %t4.so | FileCheck %s --check-prefix=ABBABC
|
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[a-bd-e]*; }; };" > %t5.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t5.script -shared %t.o -o %t5.so
|
|
|
|
# RUN: llvm-readobj -V %t5.so | FileCheck %s --check-prefix=ABB
|
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[^a-c]*; }; };" > %t6.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t6.script -shared %t.o -o %t6.so
|
|
|
|
# RUN: llvm-readobj -V %t6.so | FileCheck %s --check-prefix=NO
|
2019-01-08 18:50:59 +08:00
|
|
|
# NO: Name: _Z3abbi
|
|
|
|
# NO: Name: _Z3abci
|
2016-09-07 18:19:44 +08:00
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { ab[^c-z]*; }; };" > %t7.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t7.script -shared %t.o -o %t7.so
|
|
|
|
# RUN: llvm-readobj -V %t7.so | FileCheck %s --check-prefix=ABB
|
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { a[x-za-b][a-c]*; }; };" > %t8.script
|
2016-09-07 18:19:44 +08:00
|
|
|
# RUN: ld.lld --version-script %t8.script -shared %t.o -o %t8.so
|
|
|
|
# RUN: llvm-readobj -V %t8.so | FileCheck %s --check-prefix=ABBABC
|
|
|
|
|
2016-12-20 11:12:28 +08:00
|
|
|
# RUN: echo "FOO { global: extern \"C++\" { a[; }; };" > %t9.script
|
2018-07-03 01:48:23 +08:00
|
|
|
# RUN: not ld.lld --version-script %t9.script -shared %t.o -o /dev/null 2>&1 \
|
2016-12-20 11:12:28 +08:00
|
|
|
# RUN: | FileCheck %s --check-prefix=ERROR
|
|
|
|
# ERROR: invalid glob pattern: a[
|
|
|
|
|
2016-09-07 18:19:44 +08:00
|
|
|
.text
|
|
|
|
.globl _Z3abbi
|
|
|
|
.type _Z3abbi,@function
|
|
|
|
_Z3abbi:
|
|
|
|
retq
|
2021-02-14 02:32:27 +08:00
|
|
|
|
|
|
|
.globl _Z3abci
|
|
|
|
.type _Z3abci,@function
|
|
|
|
_Z3abci:
|
|
|
|
retq
|