2 ; RUN: llvm-as %s -o %t.o
3 ; RUN: echo "VERSION_1.0{ global: foo; local: *; }; VERSION_2.0{ global: bar; local: *; };" > %t.script
4 ; RUN: ld.lld %t.o -o %t2 -shared --version-script %t.script -save-temps
5 ; RUN: llvm-dis < %t2.0.0.preopt.bc | FileCheck %s
6 ; RUN: llvm-readobj --dyn-syms %t2 | FileCheck --check-prefix=DSO %s
8 target triple = "x86_64-unknown-linux-gnu"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19 ; CHECK: define void @foo()
20 ; CHECK: define void @bar()
22 ; DSO: DynamicSymbols [
30 ; DSO: Section: Undefined
33 ; DSO: Name: foo@@VERSION_1.0
36 ; DSO: Binding: Global
42 ; DSO: Name: bar@@VERSION_2.0
45 ; DSO: Binding: Global