1# REQUIRES: x86 2## Test that text sections with LSDA are not folded. 3 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 10 11# CHECK: selected section {{.*}}.o:(.text.Z1cv) 12# CHECK-NEXT: removing identical section {{.*}}.o:(.text.Z1dv) 13 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 21 22.section .text.Z1bv,"ax",@progbits 23_Z1bv: 24 .cfi_startproc 25 .cfi_lsda 27, .Lexception0 26 ret 27 .cfi_endproc 28 29.section .text.Z1cv,"ax",@progbits 30_Z1cv: 31 .cfi_startproc 32 .cfi_signal_frame 33 ret 34 .cfi_endproc 35 36.section .text.Z1dv,"ax",@progbits 37_Z1dv: 38 .cfi_startproc 39 ret 40 .cfi_endproc 41 42.section .gcc_except_table,"a",@progbits 43## The actual content does not matter. 44.Lexception0: 45 46## .rodata.Z1[ab]v reference .text.Z1[ab]v. Dont fold them. 47.section .rodata.Z1av,"a",@progbits 48 .long .text.Z1av - . 49 50.section .rodata.Z1bv,"a",@progbits 51 .long .text.Z1bv - . 52