blob: 247752cac84433a3b81f7c635da930a290abe2ce [file] [log] [blame]
George Rimar36b2c0a2016-06-28 08:07:26 +00001# REQUIRES: x86
2
Rui Ueyamaa3b75462016-09-07 20:50:41 +00003# RUN: echo "VERSION_1.0 { global: bar; };" > %t.script
George Rimar36b2c0a2016-06-28 08:07:26 +00004# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
5# RUN: not ld.lld --version-script %t.script -shared --no-undefined-version \
6# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR1 %s
Rui Ueyamad84124f2016-11-17 19:57:47 +00007# ERR1: version script assignment of 'VERSION_1.0' to symbol 'bar' failed: symbol not defined
George Rimar36b2c0a2016-06-28 08:07:26 +00008
Rui Ueyamaa3b75462016-09-07 20:50:41 +00009# RUN: echo "VERSION_1.0 { global: und; };" > %t2.script
George Rimar36b2c0a2016-06-28 08:07:26 +000010# RUN: not ld.lld --version-script %t2.script -shared --no-undefined-version \
11# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR2 %s
Rui Ueyamad84124f2016-11-17 19:57:47 +000012# ERR2: version script assignment of 'VERSION_1.0' to symbol 'und' failed: symbol not defined
George Rimare0fc2422016-11-16 17:59:10 +000013
14# RUN: echo "VERSION_1.0 { local: und; };" > %t3.script
15# RUN: not ld.lld --version-script %t3.script -shared --no-undefined-version \
16# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR3 %s
Rui Ueyamad84124f2016-11-17 19:57:47 +000017# ERR3: version script assignment of 'local' to symbol 'und' failed: symbol not defined
George Rimar36b2c0a2016-06-28 08:07:26 +000018
19.text
20.globl foo
21.type foo,@function
22foo:
23callq und@PLT