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 ffffffff CIE
14 # CHECK-NEXT: Version: 1
15 # CHECK-NEXT: Augmentation: "zR"
16 # CHECK-NEXT: Code alignment factor: 1
17 # CHECK-NEXT: Data alignment factor: 1
18 # CHECK-NEXT: Return address column: 240
19 # CHECK-NEXT: Augmentation data: 1A
26 .section .eh_frame, "a"
31 .byte 0x7A # Augmentation string: "zR"
35 .byte 0x01 # Code alignment factor, ULEB128
36 .byte 0x01 # Data alignment factor, ULEB128
38 .byte 0xF0 # Return address register, ubyte for version 1.
41 .byte 0x1A # DW_EH_PE_pcrel | DW_EH_PE_sdata2