1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4
5# RUN: ld.lld %t -o %t2 --gc-sections
6# RUN: llvm-readobj --symbols %t2 | FileCheck %s
7# RUN: llvm-objdump --dwarf=frames %t2 | FileCheck --check-prefix=EH %s
8
9# RUN: ld.lld %t -o %t3
10# RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=NOGC %s
11# RUN: llvm-objdump --dwarf=frames %t3 | FileCheck --check-prefix=EHNOGC %s
12
13# CHECK-NOT: foo
14# NOGC:      foo
15
16# EH:     FDE cie={{.*}} pc=
17# EH-NOT: FDE
18
19# EHNOGC: FDE cie={{.*}} pc=
20# EHNOGC: FDE cie={{.*}} pc=
21
22	.section	.text,"ax",@progbits,unique,0
23	.globl	foo
24foo:
25	.cfi_startproc
26	.cfi_endproc
27
28	.section	.text,"ax",@progbits,unique,1
29	.globl	_start
30_start:
31	.cfi_startproc
32	.cfi_endproc
33