1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4# RUN: ld.lld %t -o %t2 --icf=all --eh-frame-hdr
5# RUN: llvm-objdump -s --section-headers %t2 | FileCheck %s
6
7## Check .eh_frame_hdr contains single FDE and no garbage data at tail.
8# CHECK: Sections:
9# CHECK: Idx Name          Size
10# CHECK:     .eh_frame_hdr 00000014
11
12# CHECK: Contents of section .eh_frame_hdr:
13# CHECK-NEXT: 200158 011b033b 14000000 01000000
14#                                      ^ FDE count
15
16.globl f1, f2
17
18.section .text.f1, "ax"
19f1:
20  .cfi_startproc
21  ret
22  .cfi_endproc
23
24.section .text.f2, "ax"
25f2:
26  .cfi_startproc
27  ret
28  .cfi_endproc
29