brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 5116685 Raw
47 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t && split-file %s %t && cd %t4# RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o5# RUN: echo '.globl weak; weak:' | llvm-mc -filetype=obj -triple=x86_64 - -o weak.o6# RUN: echo '.global foo; foo:' | llvm-mc -filetype=obj -triple=x86_64 - -o 1.o7# RUN: echo '.global bar; bar:' | llvm-mc -filetype=obj -triple=x86_64 - -o 2.o8# RUN: echo '.global baz; baz:' | llvm-mc -filetype=obj -triple=x86_64 - -o 3.o9# RUN: llvm-ar rc weak.a weak.o10# RUN: llvm-ar rc 1.a 1.o 2.o 3.o11# RUN: llvm-ar rc lib2.a12 13# RUN: ld.lld a.o %t/weak.a 1.a -L. --print-archive-stats=a.txt14# RUN: FileCheck --input-file=a.txt -DT=%t %s --match-full-lines --strict-whitespace15 16## Fetches 0 member from %t/weak.a and 2 members from %t1.a17#      CHECK:members	extracted	archive18# CHECK-NEXT:1	0	[[T]]/weak.a19# CHECK-NEXT:3	2	1.a20# CHECK-NEXT:0	0	{{.*}}lib2.a21 22## - means stdout.23# RUN: ld.lld a.o %t/weak.a 1.a -L. --print-archive-stats=- | diff a.txt -24 25## The second 1.a has 0 fetched member.26# RUN: ld.lld a.o %t/weak.a -L. -l:1.a -l:1.a --print-archive-stats=- | \27# RUN:   FileCheck --check-prefix=CHECK2 %s28# CHECK2:      members	extracted	archive29# CHECK2-NEXT: 1	0	{{.*}}weak.a30# CHECK2-NEXT: 3	2	{{.*}}1.a31# CHECK2-NEXT: 3	0	{{.*}}1.a32# CHECK2-NEXT: 0	0	{{.*}}lib2.a33 34# RUN: not ld.lld -shared a.o -L. --print-archive-stats=/ 2>&1 | FileCheck --check-prefix=ERR %s35# ERR: error: --print-archive-stats=: cannot open /: {{.*}}36 37#--- a.s38.globl _start39.weak weak40_start:41  call foo42  call bar43  call weak44 45.section ".deplibs","MS",@llvm_dependent_libraries,146.asciz "2"47