1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/undef.s -o %t2.o 4# RUN: not ld.lld %t.o %t2.o -o /dev/null 2>&1 | FileCheck %s 5 6# CHECK: error: undefined symbol: zed2 7# CHECK-NEXT: >>> referenced by undef-multi.s 8# CHECK-NEXT: >>> {{.*}}:(.text+0x1) 9# CHECK-NEXT: >>> referenced by undef-multi.s 10# CHECK-NEXT: >>> {{.*}}:(.text+0x6) 11# CHECK-NEXT: >>> referenced by undef-multi.s 12# CHECK-NEXT: >>> {{.*}}:(.text+0xB) 13# CHECK-NEXT: >>> referenced 2 more times 14 15# All references to a single undefined symbol count as a single error -- but 16# at most 10 references are printed. 17# RUN: echo ".globl _bar" > %t.moreref.s 18# RUN: echo "_bar:" >> %t.moreref.s 19# RUN: echo " call zed2" >> %t.moreref.s 20# RUN: echo " call zed2" >> %t.moreref.s 21# RUN: echo " call zed2" >> %t.moreref.s 22# RUN: echo " call zed2" >> %t.moreref.s 23# RUN: echo " call zed2" >> %t.moreref.s 24# RUN: echo " call zed2" >> %t.moreref.s 25# RUN: echo " call zed2" >> %t.moreref.s 26# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.moreref.s -o %t3.o 27# RUN: not ld.lld %t.o %t2.o %t3.o -o /dev/null -error-limit=2 2>&1 | \ 28# RUN: FileCheck --check-prefix=LIMIT %s 29 30# LIMIT: error: undefined symbol: zed2 31# LIMIT-NEXT: >>> referenced by undef-multi.s 32# LIMIT-NEXT: >>> {{.*}}:(.text+0x1) 33# LIMIT-NEXT: >>> referenced by undef-multi.s 34# LIMIT-NEXT: >>> {{.*}}:(.text+0x6) 35# LIMIT-NEXT: >>> referenced by undef-multi.s 36# LIMIT-NEXT: >>> {{.*}}:(.text+0xB) 37# LIMIT-NEXT: >>> referenced 9 more times 38 39.file "undef-multi.s" 40 41 .globl _start 42_start: 43 call zed2 44 45 .globl _f 46_f: 47 call zed2 48 49 .globl _g 50_g: 51 call zed2 52 53 .globl _h 54_h: 55 call zed2 56