1 # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o
2 # RUN: llvm-dwarfdump -v %t.o | FileCheck %s
4 # The format of the .eh_frame section is similar in
5 # format and purpose to the .debug_frame section.
6 # Version 1 is often used for .eh_frame,
7 # and also it was used for DWARF v2. For that case,
8 # return address register should be encoded as ubyte,
9 # while later versions use ULEB128. This test case
10 # checks that we are able to dump it correctly.
12 # CHECK: .eh_frame contents:
13 # CHECK: 00000000 00000010 00000000 CIE
14 # CHECK-NEXT: Format: DWARF32
15 # CHECK-NEXT: Version: 1
16 # CHECK-NEXT: Augmentation: "zR"
17 # CHECK-NEXT: Code alignment factor: 1
18 # CHECK-NEXT: Data alignment factor: 1
19 # CHECK-NEXT: Return address column: 240
20 # CHECK-NEXT: Augmentation data: 1A
27 .section .eh_frame,"a",@unwind
32 .byte 0x7A # Augmentation string: "zR"
36 .byte 0x01 # Code alignment factor, ULEB128
37 .byte 0x01 # Data alignment factor, ULEB128
39 .byte 0xF0 # Return address register, ubyte for version 1.
42 .byte 0x1A # DW_EH_PE_pcrel | DW_EH_PE_sdata2