[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / icf-eh-frame.s
bloba09db0208194a95e986bd4fc21602dccc34d7c6c
1 # REQUIRES: x86
2 ## Test that text sections with LSDA are not folded.
4 ## Test REL.
5 # RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t1.o
6 # RUN: ld.lld --icf=all %t1.o -o /dev/null --print-icf-sections | FileCheck %s --implicit-check-not=removing
7 ## Test RELA.
8 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t2.o
9 # RUN: ld.lld --icf=all %t2.o -o /dev/null --print-icf-sections | FileCheck %s --implicit-check-not=removing
11 # CHECK: selected section {{.*}}.o:(.text.Z1cv)
12 # CHECK-NEXT: removing identical section {{.*}}.o:(.text.Z1dv)
14 .globl _Z1av, _Z1bv, _Z1cv, _Z1dv
15 .section .text.Z1av,"ax",@progbits
16 _Z1av:
17 .cfi_startproc
18 .cfi_lsda 27, .Lexception0
19 ret
20 .cfi_endproc
22 .section .text.Z1bv,"ax",@progbits
23 _Z1bv:
24 .cfi_startproc
25 .cfi_lsda 27, .Lexception0
26 ret
27 .cfi_endproc
29 .section .text.Z1cv,"ax",@progbits
30 _Z1cv:
31 .cfi_startproc
32 .cfi_signal_frame
33 ret
34 .cfi_endproc
36 .section .text.Z1dv,"ax",@progbits
37 _Z1dv:
38 .cfi_startproc
39 ret
40 .cfi_endproc
42 .section .gcc_except_table,"a",@progbits
43 ## The actual content does not matter.
44 .Lexception0:
46 ## .rodata.Z1[ab]v reference .text.Z1[ab]v. Dont fold them.
47 .section .rodata.Z1av,"a",@progbits
48 .long .text.Z1av - .
50 .section .rodata.Z1bv,"a",@progbits
51 .long .text.Z1bv - .