Skip to content

Commit bb993b1

Browse files
committed
[ELF][test] Fix lto/version-script2.ll
1 parent 26d3aae commit bb993b1

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎lld/test/ELF/lto/version-script2.ll‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,29 @@
77
; RUN: split-file %s %t
88
; RUN: llvm-as %t/ir -o %t.o
99
; RUN: llvm-mc -filetype=obj -triple=x86_64 %t/asm -o %tbar.o
10-
; RUN: ld.lld %tbar.o -shared --soname=tbar --version-script %t.script -o %tbar.so
11-
; RUN: echo "VER1 {};" > %t.script
10+
; RUN: ld.lld %tbar.o -shared --soname=tbar --version-script %t/ver -o %tbar.so
1211

1312
;; Emit an error if bar@VER1 is not defined.
14-
; RUN: not ld.lld %t.o -o /dev/null -shared --version-script %t.script 2>&1 | FileCheck %s --check-prefix=UNDEF
13+
; RUN: not ld.lld %t.o -o /dev/null -shared --version-script %t/ver 2>&1 | FileCheck %s --check-prefix=UNDEF
1514

1615
; UNDEF: error: undefined symbol: bar@VER1
1716

18-
; RUN: ld.lld %t.o %tbar.so -o %t.so -shared --version-script %t.script
17+
; RUN: ld.lld %t.o %tbar.so -o %t.so -shared --version-script %t/ver
1918
; RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s
2019

2120
; CHECK: UND bar@VER1
2221
; CHECK-NEXT: {{[1-9]}} foo@@VER1
2322

2423
;; For relocatable output, @ should be retained in the symbol name.
2524
;; Don't parse and drop `@VER1`. Also check that --version-script is ignored.
26-
; RUN: ld.lld %t.o -o %t.ro -r --version-script %t.script
25+
; RUN: ld.lld %t.o -o %t.ro -r --version-script %t/ver
2726
; RUN: llvm-readelf -s %t.ro | FileCheck %s --check-prefix=RELOCATABLE
2827

2928
; RELOCATABLE: {{[1-9]}} foo@@VER1
3029
; RELOCATABLE-NEXT: UND bar@VER1
3130

31+
;--- ver
32+
VER1 {};
3233
;--- ir
3334
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3435
target triple = "x86_64-unknown-linux-gnu"

0 commit comments

Comments
 (0)