52 lines · plain
1# REQUIRES: x862## Test that text sections with LSDA are not folded.3 4## Test REL.5# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t1.o6# RUN: ld.lld --icf=all %t1.o -o /dev/null --print-icf-sections | FileCheck %s --implicit-check-not=removing7## Test RELA.8# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t2.o9# RUN: ld.lld --icf=all %t2.o -o /dev/null --print-icf-sections | FileCheck %s --implicit-check-not=removing10 11# CHECK: selected section {{.*}}.o:(.text.Z1cv)12# CHECK-NEXT: removing identical section {{.*}}.o:(.text.Z1dv)13 14.globl _Z1av, _Z1bv, _Z1cv, _Z1dv15.section .text.Z1av,"ax",@progbits16_Z1av:17 .cfi_startproc18 .cfi_lsda 27, .Lexception019 ret20 .cfi_endproc21 22.section .text.Z1bv,"ax",@progbits23_Z1bv:24 .cfi_startproc25 .cfi_lsda 27, .Lexception026 ret27 .cfi_endproc28 29.section .text.Z1cv,"ax",@progbits30_Z1cv:31 .cfi_startproc32 .cfi_signal_frame33 ret34 .cfi_endproc35 36.section .text.Z1dv,"ax",@progbits37_Z1dv:38 .cfi_startproc39 ret40 .cfi_endproc41 42.section .gcc_except_table,"a",@progbits43## 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",@progbits48 .long .text.Z1av - .49 50.section .rodata.Z1bv,"a",@progbits51 .long .text.Z1bv - .52