1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 3// RUN: rm -rf %t.dir && mkdir -p %t.dir/no-soname 4// RUN: ld.lld %t.o -shared -o %t.dir/no-soname/libfoo.so 5 6// RUN: ld.lld %t.o %t.dir/no-soname/libfoo.so -o %t 7// RUN: llvm-readobj --dynamic-table %t | FileCheck %s 8 9// CHECK: 0x0000000000000001 NEEDED Shared library: [{{.*}}/no-soname/libfoo.so] 10// CHECK-NOT: NEEDED 11 12// RUN: ld.lld %t.o %t.dir/no-soname/../no-soname/libfoo.so -o %t 13// RUN: llvm-readobj --dynamic-table %t | FileCheck %s --check-prefix=CHECK2 14 15// CHECK2: 0x0000000000000001 NEEDED Shared library: [{{.*}}/no-soname/../no-soname/libfoo.so] 16// CHECK2-NOT: NEEDED 17 18// RUN: ld.lld %t.o -L%t.dir/no-soname/../no-soname -lfoo -o %t 19// RUN: llvm-readobj --dynamic-table %t | FileCheck %s --check-prefix=CHECK3 20 21// CHECK3: 0x0000000000000001 NEEDED Shared library: [libfoo.so] 22// CHECK3-NOT: NEEDED 23 24// RUN: ld.lld %t.o -shared -soname libbar.so -o %t.dir/no-soname/libbar.so 25// RUN: ld.lld %t.o %t.dir/no-soname/libbar.so -o %t 26// RUN: llvm-readobj --dynamic-table %t | FileCheck %s --check-prefix=CHECK4 27 28// CHECK4: 0x0000000000000001 NEEDED Shared library: [libbar.so] 29// CHECK4-NOT: NEEDED 30 31.global _start 32_start: 33