Index: lld/trunk/test/ELF/Inputs/verneed.so.sh =================================================================== --- lld/trunk/test/ELF/Inputs/verneed.so.sh +++ lld/trunk/test/ELF/Inputs/verneed.so.sh @@ -1,58 +0,0 @@ -#!/bin/sh -eu - -# This script was used to produce the verneed{1,2}.so files. - -tmp=$(mktemp -d) - -echo "v1 {}; v2 {}; v3 {}; { local: *; };" > $tmp/verneed.script - -cat > $tmp/verneed1.s < $tmp/verneed2.s < %t.script +# RUN: ld.lld -shared %t1.o --version-script %t.script -o %t.so + # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -# RUN: ld.lld %t.o --as-needed %S/Inputs/verneed1.so -o %t +# RUN: ld.lld %t.o --as-needed %t.so -o %t # RUN: llvm-readobj -V %t | FileCheck %s # CHECK: SHT_GNU_verneed { Index: lld/trunk/test/ELF/verneed-local.s =================================================================== --- lld/trunk/test/ELF/verneed-local.s +++ lld/trunk/test/ELF/verneed-local.s @@ -1,6 +1,10 @@ # REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/verneed1.s -o %t1.o +# RUN: echo "v1 {}; v2 {}; v3 { local: *; };" > %t.script +# RUN: ld.lld -shared %t1.o --version-script %t.script -o %t.so + # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -# RUN: not ld.lld %t.o %S/Inputs/verneed1.so -o %t 2>&1 | FileCheck %s +# RUN: not ld.lld %t.o %t.so -o %t 2>&1 | FileCheck %s # CHECK: error: undefined symbol: f3 # CHECK: >>> referenced by {{.*}}:(.text+0x1) Index: lld/trunk/test/ELF/verneed.s =================================================================== --- lld/trunk/test/ELF/verneed.s +++ lld/trunk/test/ELF/verneed.s @@ -1,6 +1,12 @@ # REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/verneed1.s -o %t1.o +# RUN: echo "v1 {}; v2 {}; v3 { local: *; };" > %t.script +# RUN: ld.lld -shared %t1.o --version-script %t.script -o %t1.so -soname verneed1.so.0 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/verneed2.s -o %t2.o +# RUN: ld.lld -shared %t2.o --version-script %t.script -o %t2.so -soname verneed2.so.0 + # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -# RUN: ld.lld %t.o %S/Inputs/verneed1.so %S/Inputs/verneed2.so -o %t +# RUN: ld.lld %t.o %t1.so %t2.so -o %t # RUN: llvm-readobj -V -sections -section-data -dyn-symbols -dynamic-table %t | FileCheck %s # CHECK: Section {