2016-06-28 16:07:26 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "VERSION_1.0 { global: bar; };" > %t.script
|
2016-06-28 16:07:26 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
|
|
# RUN: not ld.lld --version-script %t.script -shared --no-undefined-version \
|
|
|
|
# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR1 %s
|
2016-11-18 03:57:47 +08:00
|
|
|
# ERR1: version script assignment of 'VERSION_1.0' to symbol 'bar' failed: symbol not defined
|
2016-06-28 16:07:26 +08:00
|
|
|
|
2016-09-08 04:50:41 +08:00
|
|
|
# RUN: echo "VERSION_1.0 { global: und; };" > %t2.script
|
2016-06-28 16:07:26 +08:00
|
|
|
# RUN: not ld.lld --version-script %t2.script -shared --no-undefined-version \
|
|
|
|
# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR2 %s
|
2016-11-18 03:57:47 +08:00
|
|
|
# ERR2: version script assignment of 'VERSION_1.0' to symbol 'und' failed: symbol not defined
|
2016-11-17 01:59:10 +08:00
|
|
|
|
|
|
|
# RUN: echo "VERSION_1.0 { local: und; };" > %t3.script
|
|
|
|
# RUN: not ld.lld --version-script %t3.script -shared --no-undefined-version \
|
|
|
|
# RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR3 %s
|
2016-11-18 03:57:47 +08:00
|
|
|
# ERR3: version script assignment of 'local' to symbol 'und' failed: symbol not defined
|
2016-06-28 16:07:26 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl foo
|
|
|
|
.type foo,@function
|
|
|
|
foo:
|
|
|
|
callq und@PLT
|