[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / icf-many-sections.s
blob766a003dd77def99b2b695c3f63a2e88778039b5
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
3 # RUN: ld.lld --icf=all --print-icf-sections %t -o /dev/null | FileCheck %s -allow-empty
5 # CHECK-NOT: selected
7 .macro gen_sections4 z
8 .section .a\z,"ax"
9 .section .b\z,"ax"
10 .section .c\z,"ax"
11 .section .d\z,"ax"
12 .endm
14 .macro gen_sections8 z
15 gen_sections4 a\z
16 gen_sections4 b\z
17 .endm
19 .macro gen_sections16 z
20 gen_sections8 a\z
21 gen_sections8 b\z
22 .endm
24 .macro gen_sections32 x
25 gen_sections16 a\x
26 gen_sections16 b\x
27 .endm
29 .macro gen_sections64 z
30 gen_sections32 a\z
31 gen_sections32 b\z
32 .endm
34 .macro gen_sections128 z
35 gen_sections64 a\z
36 gen_sections64 b\z
37 .endm
39 .macro gen_sections256 z
40 gen_sections128 a\z
41 gen_sections128 b\z
42 .endm
44 .macro gen_sections512 z
45 gen_sections256 a\z
46 gen_sections256 b\z
47 .endm
49 .macro gen_sections1024 z
50 gen_sections512 a\z
51 gen_sections512 b\z
52 .endm
54 .macro gen_sections2048 z
55 gen_sections1024 a\z
56 gen_sections1024 b\z
57 .endm
59 gen_sections2048 a
61 .global _start
62 _start: