[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / version-script-noundef.s
blobb99fb1779f6ebd958d535bdfc838d4ba1aa4a182
1 # REQUIRES: x86
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: not ld.lld --version-script %t.script -shared %t.o -o /dev/null \
6 # RUN: --fatal-warnings 2>&1 | FileCheck -check-prefix=ERR1 %s
7 # RUN: ld.lld --version-script %t.script -shared --undefined-version %t.o -o %t.so
8 # RUN: not ld.lld --version-script %t.script -shared --no-undefined-version \
9 # RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR1 %s
10 # ERR1: version script assignment of 'VERSION_1.0' to symbol 'bar' failed: symbol not defined
12 # RUN: echo "VERSION_1.0 { global: und; };" > %t2.script
13 # RUN: not ld.lld --version-script %t2.script -shared --no-undefined-version \
14 # RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR2 %s
15 # ERR2: version script assignment of 'VERSION_1.0' to symbol 'und' failed: symbol not defined
17 # RUN: echo "VERSION_1.0 { local: und; };" > %t3.script
18 # RUN: not ld.lld --version-script %t3.script -shared --no-undefined-version \
19 # RUN: %t.o -o %t.so 2>&1 | FileCheck -check-prefix=ERR3 %s
20 # ERR3: version script assignment of 'local' to symbol 'und' failed: symbol not defined
22 ## Wildcard patterns do not error.
23 # RUN: echo "VERSION_1.0 { global: b*; local: u*; };" > %t4.script
24 # RUN: ld.lld --version-script %t4.script -shared --no-undefined-version --fatal-warnings %t.o -o /dev/null
26 .text
27 .globl foo
28 .type foo,@function
29 foo:
30 callq und@PLT