1# REQUIRES: x86 2# RUN: rm -rf %t; split-file %s %t 3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/2.s -o %t/2.o 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/3.s -o %t/3.o 5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/4.s -o %t/4.o 6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o 7 8# RUN: llvm-ar rcS %t/test.a %t/2.o %t/3.o %t/4.o 9 10# RUN: not %lld %t/test.o %t/test.a -o /dev/null 2>&1 | FileCheck %s 11# CHECK: error: {{.*}}.a: archive has no index; run ranlib to add one 12 13#--- 2.s 14.globl _boo 15_boo: 16 ret 17 18#--- 3.s 19.globl _bar 20_bar: 21 ret 22 23#--- 4.s 24.globl _undefined, _unused 25_unused: 26 ret 27 28#--- main.s 29.global _main 30_main: 31 mov $0, %rax 32 ret 33