[ELF] relocateNonAlloc: clean up workaround code
[llvm-project.git] / lld / test / COFF / undefined-symbol-multi.s
blob086d12828b2d6c827b44362c35cc6592929b96e2
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
4 # All references to a single undefined symbol count as a single error -- but
5 # at most 10 references are printed.
6 # RUN: echo ".globl bar" > %t.moreref.s
7 # RUN: echo "bar:" >> %t.moreref.s
8 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
9 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
10 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
11 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
12 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
13 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
14 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
15 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
16 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
17 # RUN: echo ' call "?foo@@YAHXZ"' >> %t.moreref.s
18 # RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t2.obj %t.moreref.s
19 # RUN: llvm-as %S/Inputs/undefined-symbol-multi-lto.ll -o %t3.obj
20 # RUN: not lld-link /out:/dev/null %t.obj %t2.obj %t3.obj 2>&1 | FileCheck %s
22 # CHECK: error: undefined symbol: int __cdecl foo(void)
23 # CHECK-NEXT: >>> referenced by {{.*}}tmp.obj:(main)
24 # CHECK-NEXT: >>> referenced by {{.*}}tmp.obj:(main)
25 # CHECK-NEXT: >>> referenced by {{.*}}tmp2.obj:(bar)
26 # CHECK-NEXT: >>> referenced 10 more times
27 # CHECK-EMPTY:
28 # CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)
29 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
30 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(f1)
31 # CHECK-NEXT: >>> referenced by {{.*}}undefined-symbol-multi-lto.ll
32 # CHECK-NEXT: >>> {{.*}}tmp3.obj
34 .section .text,"xr",one_only,main
35 .globl main
36 main:
37 call "?foo@@YAHXZ"
38 call "?foo@@YAHXZ"
39 call "?bar@@YAHXZ"
41 f1:
42 call "?bar@@YAHXZ"
43 .Lfunc_end1: