• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3# RUN: echo "VERSION_1.0 { global: bar; };" > %t.script
4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
5# RUN: ld.lld --version-script %t.script -shared %t.o -o /dev/null --fatal-warnings
6# RUN: ld.lld --version-script %t.script -shared --undefined-version %t.o -o %t.so
7# RUN: not ld.lld --version-script %t.script -shared --no-undefined-version \
8# RUN:   %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR1 %s
9# ERR1: version script assignment of 'VERSION_1.0' to symbol 'bar' failed: symbol not defined
10
11# RUN: echo "VERSION_1.0 { global: und; };" > %t2.script
12# RUN: not ld.lld --version-script %t2.script -shared --no-undefined-version \
13# RUN:   %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR2 %s
14# ERR2: version script assignment of 'VERSION_1.0' to symbol 'und' failed: symbol not defined
15
16# RUN: echo "VERSION_1.0 { local: und; };" > %t3.script
17# RUN: not ld.lld --version-script %t3.script -shared --no-undefined-version \
18# RUN:   %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR3 %s
19# ERR3: version script assignment of 'local' to symbol 'und' failed: symbol not defined
20
21.text
22.globl foo
23.type foo,@function
24foo:
25callq und@PLT
26