2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
4 # RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; } LIBSAMPLE_1.0;" >> %t.script
5 # RUN: echo "LIBSAMPLE_3.0 { global: c; } LIBSAMPLE_2.0;" >> %t.script
6 # RUN: ld.lld --version-script %t.script --undefined-version -shared -soname shared %t.o -o %t.so
7 # RUN: llvm-readobj -V --dyn-syms %t.so | FileCheck --check-prefix=DSO %s
9 # DSO: VersionDefinitions [
10 # DSO-NEXT: Definition {
11 # DSO-NEXT: Version: 1
12 # DSO-NEXT: Flags [ (0x1)
13 # DSO-NEXT: Base (0x1)
16 # DSO-NEXT: Hash: 127830196
17 # DSO-NEXT: Name: shared
18 # DSO-NEXT: Predecessors: []
20 # DSO-NEXT: Definition {
21 # DSO-NEXT: Version: 1
22 # DSO-NEXT: Flags [ (0x0)
25 # DSO-NEXT: Hash: 98457184
26 # DSO-NEXT: Name: LIBSAMPLE_1.0
27 # DSO-NEXT: Predecessors: []
29 # DSO-NEXT: Definition {
30 # DSO-NEXT: Version: 1
31 # DSO-NEXT: Flags [ (0x0)
34 # DSO-NEXT: Hash: 98456416
35 # DSO-NEXT: Name: LIBSAMPLE_2.0
36 # DSO-NEXT: Predecessors: []
38 # DSO-NEXT: Definition {
39 # DSO-NEXT: Version: 1
40 # DSO-NEXT: Flags [ (0x0)
43 # DSO-NEXT: Hash: 98456672
44 # DSO-NEXT: Name: LIBSAMPLE_3.0
45 # DSO-NEXT: Predecessors: []