2016-06-22 22:40:45 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
2016-11-23 13:14:01 +08:00
|
|
|
# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
|
|
|
|
# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; } LIBSAMPLE_1.0;" >> %t.script
|
|
|
|
# RUN: echo "LIBSAMPLE_3.0 { global: c; } LIBSAMPLE_2.0;" >> %t.script
|
2016-06-22 22:40:45 +08:00
|
|
|
# RUN: ld.lld --version-script %t.script -shared -soname shared %t.o -o %t.so
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj -V --dyn-syms %t.so | FileCheck --check-prefix=DSO %s
|
2016-06-22 22:40:45 +08:00
|
|
|
|
2019-10-17 18:23:59 +08:00
|
|
|
# DSO: VersionDefinitions [
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: Definition {
|
|
|
|
# DSO-NEXT: Version: 1
|
2019-11-18 22:43:50 +08:00
|
|
|
# DSO-NEXT: Flags [ (0x1)
|
|
|
|
# DSO-NEXT: Base (0x1)
|
|
|
|
# DSO-NEXT: ]
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: Index: 1
|
|
|
|
# DSO-NEXT: Hash: 127830196
|
|
|
|
# DSO-NEXT: Name: shared
|
2019-11-26 22:47:34 +08:00
|
|
|
# DSO-NEXT: Predecessors: []
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: }
|
|
|
|
# DSO-NEXT: Definition {
|
|
|
|
# DSO-NEXT: Version: 1
|
2019-11-18 22:43:50 +08:00
|
|
|
# DSO-NEXT: Flags [ (0x0)
|
|
|
|
# DSO-NEXT: ]
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: Index: 2
|
|
|
|
# DSO-NEXT: Hash: 98457184
|
|
|
|
# DSO-NEXT: Name: LIBSAMPLE_1.0
|
2019-11-26 22:47:34 +08:00
|
|
|
# DSO-NEXT: Predecessors: []
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: }
|
|
|
|
# DSO-NEXT: Definition {
|
|
|
|
# DSO-NEXT: Version: 1
|
2019-11-18 22:43:50 +08:00
|
|
|
# DSO-NEXT: Flags [ (0x0)
|
|
|
|
# DSO-NEXT: ]
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: Index: 3
|
|
|
|
# DSO-NEXT: Hash: 98456416
|
|
|
|
# DSO-NEXT: Name: LIBSAMPLE_2.0
|
2019-11-26 22:47:34 +08:00
|
|
|
# DSO-NEXT: Predecessors: []
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: }
|
|
|
|
# DSO-NEXT: Definition {
|
|
|
|
# DSO-NEXT: Version: 1
|
2019-11-18 22:43:50 +08:00
|
|
|
# DSO-NEXT: Flags [ (0x0)
|
|
|
|
# DSO-NEXT: ]
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: Index: 4
|
|
|
|
# DSO-NEXT: Hash: 98456672
|
|
|
|
# DSO-NEXT: Name: LIBSAMPLE_3.0
|
2019-11-26 22:47:34 +08:00
|
|
|
# DSO-NEXT: Predecessors: []
|
2016-06-22 22:40:45 +08:00
|
|
|
# DSO-NEXT: }
|
2019-10-17 18:23:59 +08:00
|
|
|
# DSO-NEXT: ]
|