2016-09-08 22:50:55 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
|
|
|
|
# RUN: echo "{ global: foo*; bar*; local: *; };" > %t.script
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld -shared --version-script %t.script %t.o -o %t.so
|
2019-09-06 23:10:31 +08:00
|
|
|
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s
|
2016-09-08 22:50:55 +08:00
|
|
|
|
2019-09-06 23:10:31 +08:00
|
|
|
.globl foo1, bar1, zed1, local
|
2016-09-08 22:50:55 +08:00
|
|
|
foo1:
|
|
|
|
bar1:
|
|
|
|
zed1:
|
2017-02-08 03:50:47 +08:00
|
|
|
local:
|
|
|
|
|
2019-09-06 23:10:31 +08:00
|
|
|
# CHECK: bar1{{$}}
|
|
|
|
# CHECK-NEXT: foo1{{$}}
|
|
|
|
# CHECK-NOT: {{.}}
|
2017-02-08 03:50:47 +08:00
|
|
|
|
|
|
|
# RUN: echo "{ global : local; local: *; };" > %t1.script
|
2019-09-06 23:10:31 +08:00
|
|
|
# RUN: ld.lld -shared --version-script %t1.script %t.o -o %t.so
|
|
|
|
# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=LOCAL %s
|
2017-02-08 03:50:47 +08:00
|
|
|
|
2019-09-06 23:10:31 +08:00
|
|
|
# LOCAL: local{{$}}
|
|
|
|
# LOCAL-NOT: {{.}}
|