[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / arm-symbol-ordering-file.s
blobc503bb2d856d0ddd17a9b7bf519f8ad4cd3ee1dc
1 # REQUIRES: arm
3 # RUN: split-file %s %t
5 # RUN: llvm-mc -filetype=obj -triple=armv7-unknown-linux %t/small.s -o %t.small.o
6 # RUN: llvm-mc -filetype=obj -triple=armv7-unknown-linux %t/large.s -o %t.large.o
7 # RUN: llvm-objcopy --set-section-flags .bar=alloc,readonly %t.large.o %t.large.RO.o
9 # RUN: echo ordered > %t_order.txt
11 # RUN: ld.lld --symbol-ordering-file %t_order.txt %t.small.o -o %t2.small.out
12 # RUN: ld.lld --symbol-ordering-file %t_order.txt %t.large.o -o %t2.large.out
13 # RUN: ld.lld --symbol-ordering-file %t_order.txt %t.large.RO.o -o %t2.large.RO.out
14 # RUN: llvm-nm -n %t2.small.out | FileCheck --check-prefix=SMALL %s
15 # RUN: llvm-nm -n %t2.large.out | FileCheck --check-prefix=LARGE %s
16 # RUN: llvm-nm -n %t2.large.RO.out | FileCheck --check-prefix=SMALL %s
17 # RUN: rm -f %t.*.o %t2.*.out
19 # SMALL: ordered
20 # SMALL-NEXT: unordered1
21 # SMALL-NEXT: unordered2
22 # SMALL-NEXT: unordered3
23 # SMALL-NEXT: unordered4
25 # LARGE: unordered1
26 # LARGE-NEXT: unordered2
27 # LARGE-NEXT: ordered
28 # LARGE-NEXT: unordered3
29 # LARGE-NEXT: unordered4
31 #--- small.s
32 .section .foo,"ax",%progbits,unique,1
33 unordered1:
34 .zero 1
36 .section .foo,"ax",%progbits,unique,2
37 unordered2:
38 .zero 1
40 .section .foo,"ax",%progbits,unique,3
41 unordered3:
42 .zero 2
44 .section .foo,"ax",%progbits,unique,4
45 unordered4:
46 .zero 4
48 .section .foo,"ax",%progbits,unique,5
49 ordered:
50 .zero 1
52 #--- large.s
53 .section .bar,"ax",%progbits,unique,1
54 unordered1:
55 .zero 0xC00000
57 .section .bar,"ax",%progbits,unique,2
58 unordered2:
59 .zero 0xC00000
61 .section .bar,"ax",%progbits,unique,3
62 unordered3:
63 .zero 0xC00000
65 .section .bar,"ax",%progbits,unique,4
66 unordered4:
67 .zero 0xC00000
69 .section .bar,"ax",%progbits,unique,5
70 ordered:
71 .zero 8