[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / undef-multi.s
blobaf21693d08913670d5cd3ea26bbb2abb927fcd13
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 --threads=1 %t.o %t2.o -o /dev/null 2>&1 | FileCheck %s
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
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 --threads=1 %t.o %t2.o %t3.o -o /dev/null -error-limit=2 2>&1 | \
28 # RUN: FileCheck --check-prefix=LIMIT %s
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
39 .file "undef-multi.s"
41 .globl _start
42 _start:
43 call zed2
45 .globl _f
46 _f:
47 call zed2
49 .globl _g
50 _g:
51 call zed2
53 .globl _h
54 _h:
55 call zed2