[SandboxIR][Doc] Add Quick start notes (#123992)
[llvm-project.git] / llvm / test / tools / llvm-readobj / COFF / arm64ec-chpe.yaml
blob91dde600d837481cf94b998f2a5d5150d1d00474
1 # RUN: yaml2obj --docnum=1 %s -o %t1
2 # RUN: llvm-readobj --coff-load-config %t1 | FileCheck %s
4 # CHECK: CHPEMetadataPointer: 0x180005000
5 # CHECK:      CHPEMetadata [
6 # CHECK-NEXT:   Version: 0x1
7 # CHECK-NEXT:   CodeMap [
8 # CHECK-NEXT:     0x1000 - 0x1030  ARM64EC
9 # CHECK-NEXT:     0x2000 - 0x2040  ARM64
10 # CHECK-NEXT:     0x3000 - 0x3050  X64
11 # CHECK-NEXT:   ]
12 # CHECK-NEXT:   CodeRangesToEntryPoints [
13 # CHECK-NEXT:     0x1000 - 0x1020 -> 0x1000
14 # CHECK-NEXT:     0x1020 - 0x1040 -> 0x2000
15 # CHECK-NEXT:   ]
16 # CHECK-NEXT:   RedirectionMetadata [
17 # CHECK-NEXT:     0x1000 -> 0x2000
18 # CHECK-NEXT:     0x1020 -> 0x2030
19 # CHECK-NEXT:   ]
20 # CHECK-NOT:    AuxiliaryDelayloadIAT:
22 --- !COFF
23 OptionalHeader:
24   ImageBase:       0x180000000
25   SectionAlignment: 4096
26   FileAlignment:   512
27   DLLCharacteristics: [ ]
28   LoadConfigTable:
29     RelativeVirtualAddress: 0x4000
30     Size:            320
31 header:
32   Machine:         IMAGE_FILE_MACHINE_AMD64
33   Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
34 sections:
35   - Name:            .text
36     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
37     VirtualAddress:  0x1000
38     VirtualSize:     0x2050
39   - Name:            .rdata
40     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
41     VirtualAddress:  0x4000
42     VirtualSize:     328
43     StructuredData:
44       - LoadConfig:
45           CHPEMetadataPointer: 0x180005000
46   - Name:            .data
47     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
48     VirtualAddress:  0x5000
49     VirtualSize:     144
50     StructuredData:
51       - UInt32: 1       # Version
52       - UInt32: 0x5050  # CodeMap
53       - UInt32: 3       # CodeMapCount
54       - UInt32: 0x5068  # CodeRangesToEntryPoints
55       - UInt32: 0x5080  # RedirectionMetadata
56       - UInt32: 0
57       - UInt32: 0
58       - UInt32: 0
59       - UInt32: 0
60       - UInt32: 0
61       - UInt32: 0
62       - UInt32: 0
63       - UInt32: 2       # CodeRangesToEntryPointsCount
64       - UInt32: 2       # RedirectionMetadataCount
65       - UInt32: 0
66       - UInt32: 0
67       - UInt32: 0
68       - UInt32: 0
69       - UInt32: 0
70       - UInt32: 0
71       - UInt32: 0x1001  # CodeMap[0]
72       - UInt32: 0x30
73       - UInt32: 0x2000  # CodeMap[1]
74       - UInt32: 0x40
75       - UInt32: 0x3002  # CodeMap[2]
76       - UInt32: 0x50
77       - UInt32: 0x1000  # CodeRangesToEntryPoints[0]
78       - UInt32: 0x1020
79       - UInt32: 0x1000
80       - UInt32: 0x1020  # CodeRangesToEntryPoints[1]
81       - UInt32: 0x1040
82       - UInt32: 0x2000
83       - UInt32: 0x1000  # RedirectionMetadata[0]
84       - UInt32: 0x2000
85       - UInt32: 0x1020  # RedirectionMetadata[1]
86       - UInt32: 0x2030
87 symbols:         []
88 ...
90 # RUN: yaml2obj --docnum=2 %s -o %t2
91 # RUN: llvm-readobj --coff-load-config %t2 | FileCheck --check-prefix=CHPE2 %s
93 # CHPE2:      CHPEMetadata [
94 # CHPE2-NEXT:   Version: 0x2
95 # CHPE2:        AuxiliaryDelayloadIAT: 0x1
96 # CHPE2-NEXT:   AuxiliaryDelayloadIATCopy: 0x2
97 # CHPE2-NEXT:   HybridImageInfoBitfield: 0x4
99 --- !COFF
100 OptionalHeader:
101   ImageBase:       0x180000000
102   SectionAlignment: 4096
103   FileAlignment:   512
104   DLLCharacteristics: [ ]
105   LoadConfigTable:
106     RelativeVirtualAddress: 0x4000
107     Size:            320
108 header:
109   Machine:         IMAGE_FILE_MACHINE_AMD64
110   Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
111 sections:
112   - Name:            .text
113     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
114     VirtualAddress:  0x1000
115     VirtualSize:     0x2050
116   - Name:            .rdata
117     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
118     VirtualAddress:  0x4000
119     VirtualSize:     328
120     StructuredData:
121       - LoadConfig:
122           CHPEMetadataPointer: 0x180005000
123   - Name:            .data
124     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
125     VirtualAddress:  0x5000
126     VirtualSize:     144
127     StructuredData:
128       - UInt32: 2       # Version
129       - UInt32: 0
130       - UInt32: 0
131       - UInt32: 0
132       - UInt32: 0
133       - UInt32: 0
134       - UInt32: 0
135       - UInt32: 0
136       - UInt32: 0
137       - UInt32: 0
138       - UInt32: 0
139       - UInt32: 0
140       - UInt32: 0
141       - UInt32: 0
142       - UInt32: 0
143       - UInt32: 0
144       - UInt32: 0
145       - UInt32: 0
146       - UInt32: 0
147       - UInt32: 0
148       - UInt32: 1       # AuxiliaryDelayloadIAT
149       - UInt32: 2       # AuxiliaryDelayloadIATCopy
150       - UInt32: 4       # HybridImageInfoBitfield
151 symbols:         []
154 # RUN: yaml2obj --docnum=3 %s -o %t3
155 # RUN: not llvm-readobj --coff-load-config %t3 2>&1 | FileCheck --check-prefix=ERR-EOF %s
156 # ERR-EOF: The end of the file was unexpectedly encountered
158 --- !COFF
159 OptionalHeader:
160   ImageBase:       0x180000000
161   SectionAlignment: 4096
162   FileAlignment:   512
163   DLLCharacteristics: [ ]
164   LoadConfigTable:
165     RelativeVirtualAddress: 0x4000
166     Size:            320
167 header:
168   Machine:         IMAGE_FILE_MACHINE_AMD64
169   Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
170 sections:
171   - Name:            .text
172     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
173     VirtualAddress:  0x1000
174     VirtualSize:     0x2050
175   - Name:            .rdata
176     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
177     VirtualAddress:  0x4000
178     VirtualSize:     512
179     StructuredData:
180       - LoadConfig:
181           CHPEMetadataPointer: 0x1800041AC
182 symbols:         []