1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: ld.lld --hash-style=sysv --eh-frame-hdr %t.o -o %t -shared
4// RUN: llvm-objdump --dwarf=frames %t | FileCheck %s
5
6// CHECK: .eh_frame contents:
7
8// CHECK:      00000000 0000001c 00000000 CIE
9// CHECK-NEXT:   Format:                DWARF32
10// CHECK-NEXT:   Version:                       1
11// CHECK-NEXT:   Augmentation:             "zPLR"
12// CHECK-NEXT:   Code alignment factor: 1
13// CHECK-NEXT:   Data alignment factor: -8
14// CHECK-NEXT:   Return address column: 16
15// CHECK-NEXT:   Personality Address: 0000000000001029
16// CHECK-NEXT:   Augmentation data:
17
18// CHECK:      DW_CFA_def_cfa:  reg7 +8
19// CHECK-NEXT: DW_CFA_offset:   reg16 -8
20// CHECK-NEXT: DW_CFA_nop:
21// CHECK-NEXT: DW_CFA_nop:
22
23/// FIXME Handle relocation correctly
24// CHECK:      00000020 00000014 00000024 FDE cie=00000000 pc=0000103c...0000103c
25// CHECK-NEXT:   Format:       DWARF32
26// CHECK-NEXT:   LSDA Address: 000000000000100b
27// CHECK-NEXT:   DW_CFA_nop:
28// CHECK-NEXT:   DW_CFA_nop:
29// CHECK-NEXT:   DW_CFA_nop:
30
31        .cfi_startproc
32        .cfi_personality 0x9b, g
33        .cfi_lsda 0x1b, h
34        .cfi_endproc
35
36        .global g
37        .hidden g
38g:
39
40        .global h
41        .hidden h
42h:
43
44