1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.foo.o 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/trace-ar1.s -o %t.obj1.o 4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/trace-ar2.s -o %t.obj2.o 5# RUN: rm -f %t.boo.a 6# RUN: llvm-ar rcs %t.boo.a %t.obj1.o %t.obj2.o 7 8## Check how -t works with achieves 9# RUN: ld.lld %t.foo.o %t.boo.a -o %t.out -t 2>&1 | FileCheck %s 10# CHECK: {{.*}}.foo.o 11# CHECK-NEXT: {{.*}}.boo.a({{.*}}.obj1.o) 12# CHECK-NOT: {{.*}}.boo.a({{.*}}.obj2.o) 13 14## Test output with --start-lib 15# RUN: ld.lld %t.foo.o --start-lib %t.obj1.o %t.obj2.o -o %t.out -t 2>&1 | FileCheck --check-prefix=STARTLIB %s 16# STARTLIB: {{.*}}.foo.o 17# STARTLIB-NEXT: {{.*}}.obj1.o 18# STARTLIB-NOT: {{.*}}.obj2.o 19 20.globl _start, _used 21_start: 22 call _used 23