33 lines · plain
1# REQUIRES: x862# UNSUPPORTED: system-windows3 4# RUN: rm -rf %t && split-file %s %t && cd %t5# RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o6# RUN: llvm-mc -filetype=obj -triple=x86_64 b.s -o b.o7 8## Create an archive with incomplete index: foo is missing.9# RUN: llvm-ar --format=gnu rc a.a a.o10# RUN: llvm-ar --format=gnu rcS b.a b.o && tail -c +9 b.a > b-tail11# RUN: cat a.a b-tail > weird.a12# RUN: llvm-nm --print-armap weird.a | FileCheck %s --check-prefix=ARMAP13 14# ARMAP: Archive map15# ARMAP-NEXT: _start in a.o16# ARMAP-EMPTY:17 18## The incomplete archive index is ignored. -u foo extracts weird.a(b.o).19## In GNU ld, foo is undefined.20# RUN: ld.lld -m elf_x86_64 -u foo weird.a -o lazy21# RUN: llvm-nm lazy | FileCheck %s --implicit-check-not={{.}}22 23# CHECK: [[#%x,]] T _start24# CHECK: [[#%x,]] T foo25 26#--- a.s27.globl _start28_start:29 30#--- b.s31.globl foo32foo:33