brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 997e7c9 Raw
63 lines · plain
1# REQUIRES: x862# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux3 4## Discard an unused .gcc_except_table in a COMDAT group or having SHF_LINK_ORDER5## if the associated text section is discarded.6 7# RUN: ld.lld --gc-sections --print-gc-sections -u _Z3foov %t.o -o /dev/null | \8# RUN:   FileCheck %s --implicit-check-not=.gcc_except_table9 10# CHECK:      removing unused section {{.*}}.o:(.text._Z6comdatv)11# CHECK-NEXT: removing unused section {{.*}}.o:(.text._Z9linkorderv)12# CHECK-NEXT: removing unused section {{.*}}.o:(.gcc_except_table._Z6comdatv)13# CHECK-NEXT: removing unused section {{.*}}.o:(.gcc_except_table._Z9linkorderv)14 15## An unused non-group non-SHF_LINK_ORDER .gcc_except_table is not discarded.16 17# RUN: ld.lld --gc-sections --print-gc-sections -u _Z6comdatv -u _Z9linkorderv %t.o -o /dev/null | \18# RUN:   FileCheck /dev/null --implicit-check-not=.gcc_except_table19 20## If the text sections are live, the .gcc_except_table sections are retained as21## well because they are referenced by .eh_frame pieces.22 23# RUN: ld.lld --gc-sections --print-gc-sections -u _Z3foov -u _Z6comdatv -u _Z9linkorderv %t.o -o /dev/null | \24# RUN:   FileCheck %s --check-prefix=KEEP25 26# KEEP-NOT: .gcc_except_table27 28.section .text._Z3foov,"ax",@progbits29.globl _Z3foov30_Z3foov:31  .cfi_startproc32  ret33  .cfi_lsda 0x1b,.Lexception034  .cfi_endproc35 36.section .text._Z6comdatv,"axG",@progbits,_Z6comdatv,comdat37.globl _Z6comdatv38_Z6comdatv:39  .cfi_startproc40  ret41  .cfi_lsda 0x1b,.Lexception142  .cfi_endproc43 44.section .text._Z9linkorderv,"ax",@progbits45.globl _Z9linkorderv46_Z9linkorderv:47  .cfi_startproc48  ret49  .cfi_lsda 0x1b,.Lexception250  .cfi_endproc51 52.section .gcc_except_table._Z3foov,"a",@progbits53.Lexception0:54  .byte 25555 56.section .gcc_except_table._Z6comdatv,"aG",@progbits,_Z6comdatv,comdat57.Lexception1:58  .byte 25559 60.section .gcc_except_table._Z9linkorderv,"ao",@progbits,_Z9linkorderv61.Lexception2:62  .byte 25563