1# RUN: yaml2obj %s -o %t.exe
2# RUN: llvm-readobj --unwind %t.exe | FileCheck %s
3
4# CHECK:        RuntimeFunction {
5# CHECK:          Function: entry (0x140001014)
6# CHECK-NEXT:     ExceptionRecord: 0x140002018
7# CHECK-NEXT:     ExceptionData {
8# CHECK-NEXT:       FunctionLength: 92
9# CHECK-NEXT:       Version: 0
10# CHECK-NEXT:       ExceptionData: Yes
11# CHECK-NEXT:       EpiloguePacked: No
12# CHECK-NEXT:       EpilogueScopes: 1
13# CHECK-NEXT:       ByteCodeLength: 8
14# CHECK-NEXT:       Prologue [
15# CHECK-NEXT:         0xd2c4              ; str x30, [sp, #32]
16# CHECK-NEXT:         0x03                ; sub sp, #48
17# CHECK-NEXT:         0xe4                ; end
18# CHECK-NEXT:       ]
19# CHECK-NEXT:       EpilogueScopes [
20# CHECK-NEXT:         EpilogueScope {
21# CHECK-NEXT:           StartOffset: 11
22# CHECK-NEXT:           EpilogueStartIndex: 4
23# CHECK-NEXT:           Opcodes [
24# CHECK-NEXT:             0xd2c4              ; ldr x30, [sp, #32]
25# CHECK-NEXT:             0x03                ; add sp, #48
26# CHECK-NEXT:             0xe4                ; end
27# CHECK-NEXT:           ]
28# CHECK-NEXT:         }
29# CHECK-NEXT:       ]
30# CHECK-NEXT:       ExceptionHandler [
31# CHECK-NEXT:         Routine: __gxx_personality_seh0 (0x140001074)
32# CHECK-NEXT:         Parameter: 0x801FFFF
33# CHECK-NEXT:       ]
34# CHECK-NEXT:     }
35# CHECK-NEXT:   }
36
37--- !COFF
38OptionalHeader:
39  AddressOfEntryPoint: 4116
40  ImageBase:       5368709120
41  SectionAlignment: 4096
42  FileAlignment:   512
43  MajorOperatingSystemVersion: 6
44  MinorOperatingSystemVersion: 0
45  MajorImageVersion: 0
46  MinorImageVersion: 0
47  MajorSubsystemVersion: 6
48  MinorSubsystemVersion: 0
49  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
50  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
51  SizeOfStackReserve: 1048576
52  SizeOfStackCommit: 4096
53  SizeOfHeapReserve: 1048576
54  SizeOfHeapCommit: 4096
55  ExportTable:
56    RelativeVirtualAddress: 0
57    Size:            0
58  ImportTable:
59    RelativeVirtualAddress: 0
60    Size:            0
61  ResourceTable:
62    RelativeVirtualAddress: 0
63    Size:            0
64  ExceptionTable:
65    RelativeVirtualAddress: 12288
66    Size:            40
67  CertificateTable:
68    RelativeVirtualAddress: 0
69    Size:            0
70  BaseRelocationTable:
71    RelativeVirtualAddress: 0
72    Size:            0
73  Debug:
74    RelativeVirtualAddress: 0
75    Size:            0
76  Architecture:
77    RelativeVirtualAddress: 0
78    Size:            0
79  GlobalPtr:
80    RelativeVirtualAddress: 0
81    Size:            0
82  TlsTable:
83    RelativeVirtualAddress: 0
84    Size:            0
85  LoadConfigTable:
86    RelativeVirtualAddress: 0
87    Size:            0
88  BoundImport:
89    RelativeVirtualAddress: 0
90    Size:            0
91  IAT:
92    RelativeVirtualAddress: 0
93    Size:            0
94  DelayImportDescriptor:
95    RelativeVirtualAddress: 0
96    Size:            0
97  ClrRuntimeHeader:
98    RelativeVirtualAddress: 0
99    Size:            0
100header:
101  Machine:         IMAGE_FILE_MACHINE_ARM64
102  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
103sections:
104  - Name:            .text
105    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
106    VirtualAddress:  4096
107    VirtualSize:     120
108    SectionData:     C0035FD6FF4300D1E00700F9FF430091C0035FD6FFC300D1FE1300F90800009008C10191E80300F9F6FFFF9701000014E07F0091080000900811009100013FD6FE1340F9FFC30091C0035FD6E00B00F9E10F00B9E07F0091080000900811009100013FD6E00B40F9E80340F900013FD6C0035FD6C0035FD6
109  - Name:            .rdata
110    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
111    VirtualAddress:  8192
112    VirtualSize:     80
113    SectionData:     0100400800000000E4E3E3E3040040080200800001E401E4170050100B000001D2C403E4D2C403E474100000FFFF010810083800184400000100400800000000E4E3E3E30100400800000000E4E3E3E3
114  - Name:            .pdata
115    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
116    VirtualAddress:  12288
117    VirtualSize:     40
118    SectionData:     0010000000200000041000000C200000141000001820000070100000382000007410000044200000
119symbols:
120  - Name:            .text
121    Value:           0
122    SectionNumber:   1
123    SimpleType:      IMAGE_SYM_TYPE_NULL
124    ComplexType:     IMAGE_SYM_DTYPE_NULL
125    StorageClass:    IMAGE_SYM_CLASS_STATIC
126  - Name:            .xdata
127    Value:           0
128    SectionNumber:   2
129    SimpleType:      IMAGE_SYM_TYPE_NULL
130    ComplexType:     IMAGE_SYM_DTYPE_NULL
131    StorageClass:    IMAGE_SYM_CLASS_STATIC
132  - Name:            .pdata
133    Value:           0
134    SectionNumber:   3
135    SimpleType:      IMAGE_SYM_TYPE_NULL
136    ComplexType:     IMAGE_SYM_DTYPE_NULL
137    StorageClass:    IMAGE_SYM_CLASS_STATIC
138  - Name:            other
139    Value:           0
140    SectionNumber:   1
141    SimpleType:      IMAGE_SYM_TYPE_NULL
142    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
143    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
144  - Name:            _ZN4RAIID2Ev
145    Value:           4
146    SectionNumber:   1
147    SimpleType:      IMAGE_SYM_TYPE_NULL
148    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
149    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
150  - Name:            entry
151    Value:           20
152    SectionNumber:   1
153    SimpleType:      IMAGE_SYM_TYPE_NULL
154    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
155    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
156  - Name:            _Unwind_Resume
157    Value:           112
158    SectionNumber:   1
159    SimpleType:      IMAGE_SYM_TYPE_NULL
160    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
161    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
162  - Name:            _ZN4RAIID1Ev
163    Value:           4
164    SectionNumber:   1
165    SimpleType:      IMAGE_SYM_TYPE_NULL
166    ComplexType:     IMAGE_SYM_DTYPE_NULL
167    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
168  - Name:            __gxx_personality_seh0
169    Value:           116
170    SectionNumber:   1
171    SimpleType:      IMAGE_SYM_TYPE_NULL
172    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
173    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
174  - Name:            GCC_except_table2
175    Value:           44
176    SectionNumber:   2
177    SimpleType:      IMAGE_SYM_TYPE_NULL
178    ComplexType:     IMAGE_SYM_DTYPE_NULL
179    StorageClass:    IMAGE_SYM_CLASS_STATIC
180...
181