]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/version-script-locals.s
Vendor import of lld trunk r290819:
[FreeBSD/FreeBSD.git] / test / ELF / version-script-locals.s
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3
4 # RUN: echo "VERSION_1.0 { local: foo1; };" > %t.script
5 # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
6 # RUN: llvm-readobj -dyn-symbols %t.so | FileCheck --check-prefix=EXACT %s
7 # EXACT:  DynamicSymbols [
8 # EXACT:      _start
9 # EXACT-NOT:  foo1
10 # EXACT:      foo2
11 # EXACT:      foo3
12
13 # RUN: echo "VERSION_1.0 { local: foo*; };" > %t.script
14 # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
15 # RUN: llvm-readobj -dyn-symbols %t.so | FileCheck --check-prefix=WC %s
16 # WC:  DynamicSymbols [
17 # WC:      _start
18 # WC-NOT:  foo1
19 # WC-NOT:  foo2
20 # WC-NOT:  foo3
21
22 # RUN: echo "VERSION_1.0 { global: *; local: foo*; };" > %t.script
23 # RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
24 # RUN: llvm-readobj -dyn-symbols %t.so | FileCheck --check-prefix=MIX %s
25 # MIX:  DynamicSymbols [
26 # MIX:      _start@@VERSION_1.0
27 # MIX-NOT:  foo1
28 # MIX-NOT:  foo2
29 # MIX-NOT:  foo3
30
31 .globl foo1
32 foo1:
33   ret
34
35 .globl foo2
36 foo2:
37   ret
38
39 .globl foo3
40 foo3:
41   ret
42
43 .globl _start
44 _start:
45   ret