1 # Test ARM64X dynamic relocation validation.
3 # RUN: yaml2obj %s --docnum=1 -o %t1.dll
4 # RUN: not llvm-readobj %t1.dll 2>&1 | FileCheck --check-prefix=ERR-HEADER-RVA %s
5 # ERR-HEADER-RVA: RVA 0x1002 for ARM64X reloc not found
10 SectionAlignment: 4096
12 DLLCharacteristics: [ ]
14 RelativeVirtualAddress: 0x5000
17 Machine: IMAGE_FILE_MACHINE_ARM64
18 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
21 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
22 VirtualAddress: 0x2000
25 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
26 VirtualAddress: 0x5000
30 CHPEMetadataPointer: 0x180005000
31 DynamicValueRelocTableOffset: 4
32 DynamicValueRelocTableSection: 4
34 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
35 VirtualAddress: 0x6000
39 - UInt32: 0x5050 # CodeMap
40 - UInt32: 3 # CodeMapCount
41 - UInt32: 0x5068 # CodeRangesToEntryPoints
42 - UInt32: 0x5080 # RedirectionMetadata
50 - UInt32: 0 # CodeRangesToEntryPointsCount
51 - UInt32: 0 # RedirectionMetadataCount
58 - UInt32: 0x1001 # CodeMap[0]
60 - UInt32: 0x2000 # CodeMap[1]
62 - UInt32: 0x3002 # CodeMap[2]
65 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
66 VirtualAddress: 0x7000
70 - UInt32: 1 # coff_dynamic_reloc_table.Version
71 - UInt32: 24 # coff_dynamic_reloc_table.Size
72 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
73 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
74 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
75 - UInt32: 0x1000 # coff_base_reloc_block_header[0].PageRVA
76 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
77 - Binary: 0040 # ZERO offset 0xf00, size 2
78 - Binary: 0000 # terminator
82 # RUN: yaml2obj %s --docnum=2 -o %t2.dll
83 # RUN: not llvm-readobj %t2.dll 2>&1 | FileCheck --check-prefix=ERR-SEC-INDEX %s
84 # ERR-SEC-INDEX: section index out of bounds
88 ImageBase: 0x180000000
89 SectionAlignment: 4096
91 DLLCharacteristics: [ ]
93 RelativeVirtualAddress: 0x4000
96 Machine: IMAGE_FILE_MACHINE_ARM64
97 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
100 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
101 VirtualAddress: 0x1000
104 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
105 VirtualAddress: 0x4000
109 CHPEMetadataPointer: 0x180005000
110 DynamicValueRelocTableOffset: 4
111 DynamicValueRelocTableSection: 5
113 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
114 VirtualAddress: 0x5000
117 - UInt32: 1 # Version
118 - UInt32: 0x5050 # CodeMap
119 - UInt32: 3 # CodeMapCount
120 - UInt32: 0x5068 # CodeRangesToEntryPoints
121 - UInt32: 0x5080 # RedirectionMetadata
129 - UInt32: 0 # CodeRangesToEntryPointsCount
130 - UInt32: 0 # RedirectionMetadataCount
137 - UInt32: 0x1001 # CodeMap[0]
139 - UInt32: 0x2000 # CodeMap[1]
141 - UInt32: 0x3002 # CodeMap[2]
146 # RUN: yaml2obj %s --docnum=3 -o %t3.dll
147 # RUN: not llvm-readobj %t3.dll 2>&1 | FileCheck --check-prefix=ERR-DIR-INDEX %s
148 # ERR-DIR-INDEX: Too large DynamicValueRelocTableOffset (4)
152 ImageBase: 0x180000000
153 SectionAlignment: 4096
155 DLLCharacteristics: [ ]
157 RelativeVirtualAddress: 0x4000
160 Machine: IMAGE_FILE_MACHINE_ARM64
161 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
164 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
165 VirtualAddress: 0x1000
168 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
169 VirtualAddress: 0x4000
173 CHPEMetadataPointer: 0x180005000
174 DynamicValueRelocTableOffset: 4
175 DynamicValueRelocTableSection: 4
177 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
178 VirtualAddress: 0x5000
181 - UInt32: 1 # Version
182 - UInt32: 0x5050 # CodeMap
183 - UInt32: 3 # CodeMapCount
184 - UInt32: 0x5068 # CodeRangesToEntryPoints
185 - UInt32: 0x5080 # RedirectionMetadata
193 - UInt32: 0 # CodeRangesToEntryPointsCount
194 - UInt32: 0 # RedirectionMetadataCount
201 - UInt32: 0x1001 # CodeMap[0]
203 - UInt32: 0x2000 # CodeMap[1]
205 - UInt32: 0x3002 # CodeMap[2]
208 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
209 VirtualAddress: 0x7000
213 - UInt32: 1 # coff_dynamic_reloc_table.Version
214 - Binary: 010000 # coff_dynamic_reloc_table.Size
218 # RUN: yaml2obj %s --docnum=4 -o %t4.dll
219 # RUN: not llvm-readobj %t4.dll 2>&1 | FileCheck --check-prefix=ERR-DIR-SIZE %s
220 # ERR-DIR-SIZE: Indvalid dynamic relocations directory size (2)
224 ImageBase: 0x180000000
225 SectionAlignment: 4096
227 DLLCharacteristics: [ ]
229 RelativeVirtualAddress: 0x4000
232 Machine: IMAGE_FILE_MACHINE_ARM64
233 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
236 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
237 VirtualAddress: 0x1000
240 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
241 VirtualAddress: 0x4000
245 CHPEMetadataPointer: 0x180005000
246 DynamicValueRelocTableOffset: 4
247 DynamicValueRelocTableSection: 4
249 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
250 VirtualAddress: 0x5000
253 - UInt32: 1 # Version
254 - UInt32: 0x5050 # CodeMap
255 - UInt32: 3 # CodeMapCount
256 - UInt32: 0x5068 # CodeRangesToEntryPoints
257 - UInt32: 0x5080 # RedirectionMetadata
265 - UInt32: 0 # CodeRangesToEntryPointsCount
266 - UInt32: 0 # RedirectionMetadataCount
273 - UInt32: 0x1001 # CodeMap[0]
275 - UInt32: 0x2000 # CodeMap[1]
277 - UInt32: 0x3002 # CodeMap[2]
280 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
281 VirtualAddress: 0x7000
285 - UInt32: 1 # coff_dynamic_reloc_table.Version
286 - UInt32: 2 # coff_dynamic_reloc_table.Size
291 # RUN: yaml2obj %s --docnum=5 -o %t5.dll
292 # RUN: not llvm-readobj %t5.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-SIZE %s
293 # ERR-RELOC-SIZE: Unexpected end of dynamic relocations data
297 ImageBase: 0x180000000
298 SectionAlignment: 4096
300 DLLCharacteristics: [ ]
302 RelativeVirtualAddress: 0x4000
305 Machine: IMAGE_FILE_MACHINE_ARM64
306 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
309 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
310 VirtualAddress: 0x1000
313 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
314 VirtualAddress: 0x4000
318 CHPEMetadataPointer: 0x180005000
319 DynamicValueRelocTableOffset: 4
320 DynamicValueRelocTableSection: 4
322 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
323 VirtualAddress: 0x5000
326 - UInt32: 1 # Version
327 - UInt32: 0x5050 # CodeMap
328 - UInt32: 3 # CodeMapCount
329 - UInt32: 0x5068 # CodeRangesToEntryPoints
330 - UInt32: 0x5080 # RedirectionMetadata
338 - UInt32: 0 # CodeRangesToEntryPointsCount
339 - UInt32: 0 # RedirectionMetadataCount
346 - UInt32: 0x1001 # CodeMap[0]
348 - UInt32: 0x2000 # CodeMap[1]
350 - UInt32: 0x3002 # CodeMap[2]
353 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
354 VirtualAddress: 0x7000
358 - UInt32: 1 # coff_dynamic_reloc_table.Version
359 - UInt32: 11 # coff_dynamic_reloc_table.Size
360 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
361 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
366 # RUN: yaml2obj %s --docnum=6 -o %t6.dll
367 # RUN: not llvm-readobj %t6.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-SIZE2 %s
368 # ERR-RELOC-SIZE2: Too large dynamic relocation size (4)
372 ImageBase: 0x180000000
373 SectionAlignment: 4096
375 DLLCharacteristics: [ ]
377 RelativeVirtualAddress: 0x4000
380 Machine: IMAGE_FILE_MACHINE_ARM64
381 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
384 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
385 VirtualAddress: 0x1000
388 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
389 VirtualAddress: 0x4000
393 CHPEMetadataPointer: 0x180005000
394 DynamicValueRelocTableOffset: 4
395 DynamicValueRelocTableSection: 4
397 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
398 VirtualAddress: 0x5000
401 - UInt32: 1 # Version
402 - UInt32: 0x5050 # CodeMap
403 - UInt32: 3 # CodeMapCount
404 - UInt32: 0x5068 # CodeRangesToEntryPoints
405 - UInt32: 0x5080 # RedirectionMetadata
413 - UInt32: 0 # CodeRangesToEntryPointsCount
414 - UInt32: 0 # RedirectionMetadataCount
421 - UInt32: 0x1001 # CodeMap[0]
423 - UInt32: 0x2000 # CodeMap[1]
425 - UInt32: 0x3002 # CodeMap[2]
428 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
429 VirtualAddress: 0x7000
433 - UInt32: 1 # coff_dynamic_reloc_table.Version
434 - UInt32: 15 # coff_dynamic_reloc_table.Size
435 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
436 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
437 - UInt32: 4 # coff_dynamic_relocation64.BaseRelocSize
442 # RUN: yaml2obj %s --docnum=7 -o %t7.dll
443 # RUN: not llvm-readobj %t7.dll 2>&1 | FileCheck --check-prefix=ERR-BLOCK-SIZE %s
444 # ERR-BLOCK-SIZE: ARM64X relocations block size (7) is too small
448 ImageBase: 0x180000000
449 SectionAlignment: 4096
451 DLLCharacteristics: [ ]
453 RelativeVirtualAddress: 0x4000
456 Machine: IMAGE_FILE_MACHINE_ARM64
457 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
460 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
461 VirtualAddress: 0x1000
464 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
465 VirtualAddress: 0x4000
469 CHPEMetadataPointer: 0x180005000
470 DynamicValueRelocTableOffset: 4
471 DynamicValueRelocTableSection: 4
473 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
474 VirtualAddress: 0x5000
477 - UInt32: 1 # Version
478 - UInt32: 0x5050 # CodeMap
479 - UInt32: 3 # CodeMapCount
480 - UInt32: 0x5068 # CodeRangesToEntryPoints
481 - UInt32: 0x5080 # RedirectionMetadata
489 - UInt32: 0 # CodeRangesToEntryPointsCount
490 - UInt32: 0 # RedirectionMetadataCount
497 - UInt32: 0x1001 # CodeMap[0]
499 - UInt32: 0x2000 # CodeMap[1]
501 - UInt32: 0x3002 # CodeMap[2]
504 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
505 VirtualAddress: 0x7000
509 - UInt32: 1 # coff_dynamic_reloc_table.Version
510 - UInt32: 21 # coff_dynamic_reloc_table.Size
511 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
512 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
513 - UInt32: 9 # coff_dynamic_relocation64.BaseRelocSize
514 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
515 - UInt32: 7 # coff_base_reloc_block_header[0].BlockSize
520 # RUN: yaml2obj %s --docnum=8 -o %t8.dll
521 # RUN: not llvm-readobj %t8.dll 2>&1 | FileCheck --check-prefix=ERR-BLOCK-SIZE2 %s
522 # ERR-BLOCK-SIZE2: Unaligned ARM64X relocations block size (10)
526 ImageBase: 0x180000000
527 SectionAlignment: 4096
529 DLLCharacteristics: [ ]
531 RelativeVirtualAddress: 0x4000
534 Machine: IMAGE_FILE_MACHINE_ARM64
535 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
538 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
539 VirtualAddress: 0x1000
542 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
543 VirtualAddress: 0x4000
547 CHPEMetadataPointer: 0x180005000
548 DynamicValueRelocTableOffset: 4
549 DynamicValueRelocTableSection: 4
551 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
552 VirtualAddress: 0x5000
555 - UInt32: 1 # Version
556 - UInt32: 0x5050 # CodeMap
557 - UInt32: 3 # CodeMapCount
558 - UInt32: 0x5068 # CodeRangesToEntryPoints
559 - UInt32: 0x5080 # RedirectionMetadata
567 - UInt32: 0 # CodeRangesToEntryPointsCount
568 - UInt32: 0 # RedirectionMetadataCount
575 - UInt32: 0x1001 # CodeMap[0]
577 - UInt32: 0x2000 # CodeMap[1]
579 - UInt32: 0x3002 # CodeMap[2]
582 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
583 VirtualAddress: 0x7000
587 - UInt32: 1 # coff_dynamic_reloc_table.Version
588 - UInt32: 22 # coff_dynamic_reloc_table.Size
589 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
590 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
591 - UInt32: 10 # coff_dynamic_relocation64.BaseRelocSize
592 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
593 - UInt32: 10 # coff_base_reloc_block_header[0].BlockSize
598 # RUN: yaml2obj %s --docnum=9 -o %t9.dll
599 # RUN: not llvm-readobj %t9.dll 2>&1 | FileCheck --check-prefix=ERR-BLOCK-SIZE3 %s
600 # ERR-BLOCK-SIZE3: ARM64X relocations block size (12) is too large
604 ImageBase: 0x180000000
605 SectionAlignment: 4096
607 DLLCharacteristics: [ ]
609 RelativeVirtualAddress: 0x4000
612 Machine: IMAGE_FILE_MACHINE_ARM64
613 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
616 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
617 VirtualAddress: 0x1000
620 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
621 VirtualAddress: 0x4000
625 CHPEMetadataPointer: 0x180005000
626 DynamicValueRelocTableOffset: 4
627 DynamicValueRelocTableSection: 4
629 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
630 VirtualAddress: 0x5000
633 - UInt32: 1 # Version
634 - UInt32: 0x5050 # CodeMap
635 - UInt32: 3 # CodeMapCount
636 - UInt32: 0x5068 # CodeRangesToEntryPoints
637 - UInt32: 0x5080 # RedirectionMetadata
645 - UInt32: 0 # CodeRangesToEntryPointsCount
646 - UInt32: 0 # RedirectionMetadataCount
653 - UInt32: 0x1001 # CodeMap[0]
655 - UInt32: 0x2000 # CodeMap[1]
657 - UInt32: 0x3002 # CodeMap[2]
660 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
661 VirtualAddress: 0x7000
665 - UInt32: 1 # coff_dynamic_reloc_table.Version
666 - UInt32: 23 # coff_dynamic_reloc_table.Size
667 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
668 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
669 - UInt32: 11 # coff_dynamic_relocation64.BaseRelocSize
670 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
671 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
676 # RUN: yaml2obj %s --docnum=10 -o %t10.dll
677 # RUN: not llvm-readobj %t10.dll 2>&1 | FileCheck --check-prefix=ERR-TERMINATOR %s
678 # ERR-TERMINATOR: Unexpected ARM64X relocations terminator
682 ImageBase: 0x180000000
683 SectionAlignment: 4096
685 DLLCharacteristics: [ ]
687 RelativeVirtualAddress: 0x4000
690 Machine: IMAGE_FILE_MACHINE_ARM64
691 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
694 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
695 VirtualAddress: 0x1000
698 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
699 VirtualAddress: 0x4000
703 CHPEMetadataPointer: 0x180005000
704 DynamicValueRelocTableOffset: 4
705 DynamicValueRelocTableSection: 4
707 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
708 VirtualAddress: 0x5000
711 - UInt32: 1 # Version
712 - UInt32: 0x5050 # CodeMap
713 - UInt32: 3 # CodeMapCount
714 - UInt32: 0x5068 # CodeRangesToEntryPoints
715 - UInt32: 0x5080 # RedirectionMetadata
723 - UInt32: 0 # CodeRangesToEntryPointsCount
724 - UInt32: 0 # RedirectionMetadataCount
731 - UInt32: 0x1001 # CodeMap[0]
733 - UInt32: 0x2000 # CodeMap[1]
735 - UInt32: 0x3002 # CodeMap[2]
738 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
739 VirtualAddress: 0x7000
743 - UInt32: 1 # coff_dynamic_reloc_table.Version
744 - UInt32: 24 # coff_dynamic_reloc_table.Size
745 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
746 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
747 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
748 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
749 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
754 # RUN: yaml2obj %s --docnum=11 -o %t11.dll
755 # RUN: not llvm-readobj %t11.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-TYPE %s
756 # ERR-RELOC-TYPE: Invalid relocation type
760 ImageBase: 0x180000000
761 SectionAlignment: 4096
763 DLLCharacteristics: [ ]
765 RelativeVirtualAddress: 0x4000
768 Machine: IMAGE_FILE_MACHINE_ARM64
769 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
772 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
773 VirtualAddress: 0x1000
776 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
777 VirtualAddress: 0x4000
781 CHPEMetadataPointer: 0x180005000
782 DynamicValueRelocTableOffset: 4
783 DynamicValueRelocTableSection: 4
785 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
786 VirtualAddress: 0x5000
789 - UInt32: 1 # Version
790 - UInt32: 0x5050 # CodeMap
791 - UInt32: 3 # CodeMapCount
792 - UInt32: 0x5068 # CodeRangesToEntryPoints
793 - UInt32: 0x5080 # RedirectionMetadata
801 - UInt32: 0 # CodeRangesToEntryPointsCount
802 - UInt32: 0 # RedirectionMetadataCount
809 - UInt32: 0x1001 # CodeMap[0]
811 - UInt32: 0x2000 # CodeMap[1]
813 - UInt32: 0x3002 # CodeMap[2]
816 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
817 VirtualAddress: 0x7000
821 - UInt32: 1 # coff_dynamic_reloc_table.Version
822 - UInt32: 24 # coff_dynamic_reloc_table.Size
823 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
824 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
825 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
826 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
827 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
832 # RUN: yaml2obj %s --docnum=12 -o %t12.dll
833 # RUN: not llvm-readobj %t12.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-VALUE %s
834 # ERR-RELOC-VALUE: Invalid ARM64X relocation value size (0)
838 ImageBase: 0x180000000
839 SectionAlignment: 4096
841 DLLCharacteristics: [ ]
843 RelativeVirtualAddress: 0x4000
846 Machine: IMAGE_FILE_MACHINE_ARM64
847 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
850 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
851 VirtualAddress: 0x1000
854 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
855 VirtualAddress: 0x4000
859 CHPEMetadataPointer: 0x180005000
860 DynamicValueRelocTableOffset: 4
861 DynamicValueRelocTableSection: 4
863 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
864 VirtualAddress: 0x5000
867 - UInt32: 1 # Version
868 - UInt32: 0x5050 # CodeMap
869 - UInt32: 3 # CodeMapCount
870 - UInt32: 0x5068 # CodeRangesToEntryPoints
871 - UInt32: 0x5080 # RedirectionMetadata
879 - UInt32: 0 # CodeRangesToEntryPointsCount
880 - UInt32: 0 # RedirectionMetadataCount
887 - UInt32: 0x1001 # CodeMap[0]
889 - UInt32: 0x2000 # CodeMap[1]
891 - UInt32: 0x3002 # CodeMap[2]
894 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
895 VirtualAddress: 0x7000
899 - UInt32: 1 # coff_dynamic_reloc_table.Version
900 - UInt32: 24 # coff_dynamic_reloc_table.Size
901 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
902 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
903 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
904 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
905 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
910 # RUN: yaml2obj %s --docnum=13 -o %t13.dll
911 # RUN: not llvm-readobj %t13.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-RVA %s
912 # ERR-RELOC-RVA: RVA 0x6062 for ARM64X reloc not found
916 ImageBase: 0x180000000
917 SectionAlignment: 4096
919 DLLCharacteristics: [ ]
921 RelativeVirtualAddress: 0x4000
924 Machine: IMAGE_FILE_MACHINE_ARM64
925 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
928 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
929 VirtualAddress: 0x1000
932 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
933 VirtualAddress: 0x4000
937 CHPEMetadataPointer: 0x180005000
938 DynamicValueRelocTableOffset: 4
939 DynamicValueRelocTableSection: 4
941 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
942 VirtualAddress: 0x5000
945 - UInt32: 1 # Version
946 - UInt32: 0x5050 # CodeMap
947 - UInt32: 3 # CodeMapCount
948 - UInt32: 0x5068 # CodeRangesToEntryPoints
949 - UInt32: 0x5080 # RedirectionMetadata
957 - UInt32: 0 # CodeRangesToEntryPointsCount
958 - UInt32: 0 # RedirectionMetadataCount
965 - UInt32: 0x1001 # CodeMap[0]
967 - UInt32: 0x2000 # CodeMap[1]
969 - UInt32: 0x3002 # CodeMap[2]
972 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
973 VirtualAddress: 0x7000
977 - UInt32: 1 # coff_dynamic_reloc_table.Version
978 - UInt32: 24 # coff_dynamic_reloc_table.Size
979 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
980 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
981 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
982 - UInt32: 0x6000 # coff_base_reloc_block_header[0].PageRVA
983 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
984 - Binary: 6040 # ZERO offset 0x60, size 2
985 - Binary: 0000 # terminator
989 # RUN: yaml2obj %s --docnum=14 -o %t14.dll
990 # RUN: not llvm-readobj %t14.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-RVA-SIZE %s
991 # ERR-RELOC-RVA-SIZE: RVA 0x6062 for ARM64X reloc not found
995 ImageBase: 0x180000000
996 SectionAlignment: 4096
998 DLLCharacteristics: [ ]
1000 RelativeVirtualAddress: 0x4000
1003 Machine: IMAGE_FILE_MACHINE_ARM64
1004 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1007 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1008 VirtualAddress: 0x1000
1011 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1012 VirtualAddress: 0x4000
1016 CHPEMetadataPointer: 0x180005000
1017 DynamicValueRelocTableOffset: 4
1018 DynamicValueRelocTableSection: 4
1020 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1021 VirtualAddress: 0x5000
1024 - UInt32: 1 # Version
1025 - UInt32: 0x5050 # CodeMap
1026 - UInt32: 3 # CodeMapCount
1027 - UInt32: 0x5068 # CodeRangesToEntryPoints
1028 - UInt32: 0x5080 # RedirectionMetadata
1036 - UInt32: 0 # CodeRangesToEntryPointsCount
1037 - UInt32: 0 # RedirectionMetadataCount
1044 - UInt32: 0x1001 # CodeMap[0]
1046 - UInt32: 0x2000 # CodeMap[1]
1048 - UInt32: 0x3002 # CodeMap[2]
1051 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1052 VirtualAddress: 0x7000
1056 - UInt32: 1 # coff_dynamic_reloc_table.Version
1057 - UInt32: 24 # coff_dynamic_reloc_table.Size
1058 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1059 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1060 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
1061 - UInt32: 0x6000 # coff_base_reloc_block_header[0].PageRVA
1062 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1063 - Binary: 6040 # ZERO offset 0x60, size 2
1064 - Binary: 0000 # terminator
1068 # RUN: yaml2obj %s --docnum=15 -o %t15.dll
1069 # RUN: not llvm-readobj %t15.dll 2>&1 | FileCheck --check-prefix=ERR-PAGE-RVA %s
1070 # ERR-PAGE-RVA: Unaligned ARM64X relocations page RVA (24577)
1074 ImageBase: 0x180000000
1075 SectionAlignment: 4096
1077 DLLCharacteristics: [ ]
1079 RelativeVirtualAddress: 0x4000
1082 Machine: IMAGE_FILE_MACHINE_ARM64
1083 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1086 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1087 VirtualAddress: 0x1000
1090 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1091 VirtualAddress: 0x4000
1095 CHPEMetadataPointer: 0x180005000
1096 DynamicValueRelocTableOffset: 4
1097 DynamicValueRelocTableSection: 4
1099 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1100 VirtualAddress: 0x5000
1103 - UInt32: 1 # Version
1104 - UInt32: 0x5050 # CodeMap
1105 - UInt32: 3 # CodeMapCount
1106 - UInt32: 0x5068 # CodeRangesToEntryPoints
1107 - UInt32: 0x5080 # RedirectionMetadata
1115 - UInt32: 0 # CodeRangesToEntryPointsCount
1116 - UInt32: 0 # RedirectionMetadataCount
1123 - UInt32: 0x1001 # CodeMap[0]
1125 - UInt32: 0x2000 # CodeMap[1]
1127 - UInt32: 0x3002 # CodeMap[2]
1130 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1131 VirtualAddress: 0x7000
1135 - UInt32: 1 # coff_dynamic_reloc_table.Version
1136 - UInt32: 24 # coff_dynamic_reloc_table.Size
1137 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1138 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1139 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
1140 - UInt32: 0x6001 # coff_base_reloc_block_header[0].PageRVA
1141 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1142 - Binary: 0040 # ZERO offset 0, size 2
1143 - Binary: 0000 # terminator
1147 # RUN: yaml2obj %s --docnum=16 -o %t16.dll
1148 # RUN: not llvm-readobj %t16.dll 2>&1 | FileCheck --check-prefix=ERR-V2-HEADER-SIZE %s
1149 # ERR-V2-HEADER-SIZE: Invalid dynamic relocation header size (23)
1153 ImageBase: 0x180000000
1154 SectionAlignment: 4096
1156 DLLCharacteristics: [ ]
1158 RelativeVirtualAddress: 0x4000
1161 Machine: IMAGE_FILE_MACHINE_ARM64
1162 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1165 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1166 VirtualAddress: 0x1000
1169 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1170 VirtualAddress: 0x4000
1174 CHPEMetadataPointer: 0x180005000
1175 DynamicValueRelocTableOffset: 4
1176 DynamicValueRelocTableSection: 4
1178 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1179 VirtualAddress: 0x5000
1182 - UInt32: 1 # Version
1183 - UInt32: 0x5050 # CodeMap
1184 - UInt32: 3 # CodeMapCount
1185 - UInt32: 0x5068 # CodeRangesToEntryPoints
1186 - UInt32: 0x5080 # RedirectionMetadata
1194 - UInt32: 0 # CodeRangesToEntryPointsCount
1195 - UInt32: 0 # RedirectionMetadataCount
1202 - UInt32: 0x1001 # CodeMap[0]
1204 - UInt32: 0x2000 # CodeMap[1]
1206 - UInt32: 0x3002 # CodeMap[2]
1209 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1210 VirtualAddress: 0x7000
1214 - UInt32: 2 # coff_dynamic_reloc_table.Version
1215 - UInt32: 36 # coff_dynamic_reloc_table.Size
1216 - UInt32: 23 # coff_dynamic_relocation64_v2.HeaderSize
1217 - UInt32: 12 # coff_dynamic_relocation64_v2.FixupInfoSize
1218 - UInt32: 6 # coff_dynamic_relocation64_v2.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1219 - UInt32: 0 # coff_dynamic_relocation64_v2.Symbol(high)
1220 - UInt32: 0 # coff_dynamic_relocation64_v2.SymbolGroup
1221 - UInt32: 0 # coff_dynamic_relocation64_v2.Flags
1222 - UInt32: 0x6000 # coff_base_reloc_block_header[0].PageRVA
1223 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1224 - Binary: 0040 # ZERO offset 0, size 2
1225 - Binary: 0000 # terminator
1229 # RUN: yaml2obj %s --docnum=17 -o %t17.dll
1230 # RUN: not llvm-readobj %t17.dll 2>&1 | FileCheck --check-prefix=ERR-RELOC-SIZE %s
1234 ImageBase: 0x180000000
1235 SectionAlignment: 4096
1237 DLLCharacteristics: [ ]
1239 RelativeVirtualAddress: 0x4000
1242 Machine: IMAGE_FILE_MACHINE_ARM64
1243 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1246 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1247 VirtualAddress: 0x1000
1250 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1251 VirtualAddress: 0x4000
1255 CHPEMetadataPointer: 0x180005000
1256 DynamicValueRelocTableOffset: 4
1257 DynamicValueRelocTableSection: 4
1259 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1260 VirtualAddress: 0x5000
1263 - UInt32: 1 # Version
1264 - UInt32: 0x5050 # CodeMap
1265 - UInt32: 3 # CodeMapCount
1266 - UInt32: 0x5068 # CodeRangesToEntryPoints
1267 - UInt32: 0x5080 # RedirectionMetadata
1275 - UInt32: 0 # CodeRangesToEntryPointsCount
1276 - UInt32: 0 # RedirectionMetadataCount
1283 - UInt32: 0x1001 # CodeMap[0]
1285 - UInt32: 0x2000 # CodeMap[1]
1287 - UInt32: 0x3002 # CodeMap[2]
1290 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1291 VirtualAddress: 0x7000
1295 - UInt32: 2 # coff_dynamic_reloc_table.Version
1296 - UInt32: 20 # coff_dynamic_reloc_table.Size
1297 - UInt32: 24 # coff_dynamic_relocation64_v2.HeaderSize
1298 - UInt32: 12 # coff_dynamic_relocation64_v2.FixupInfoSize
1299 - UInt32: 6 # coff_dynamic_relocation64_v2.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1300 - UInt32: 0 # coff_dynamic_relocation64_v2.Symbol(high)
1301 - UInt32: 0 # coff_dynamic_relocation64_v2.SymbolGroup
1305 # RUN: yaml2obj %s --docnum=18 -o %t18.dll
1306 # RUN: not llvm-readobj %t18.dll 2>&1 | FileCheck --check-prefix=ERR-RVA-ALIGN %s
1307 # ERR-RVA-ALIGN: Unaligned ARM64X relocation RVA (24577)
1311 ImageBase: 0x180000000
1312 SectionAlignment: 4096
1314 DLLCharacteristics: [ ]
1316 RelativeVirtualAddress: 0x4000
1319 Machine: IMAGE_FILE_MACHINE_ARM64
1320 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1323 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1324 VirtualAddress: 0x1000
1327 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1328 VirtualAddress: 0x4000
1332 CHPEMetadataPointer: 0x180005000
1333 DynamicValueRelocTableOffset: 4
1334 DynamicValueRelocTableSection: 4
1336 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1337 VirtualAddress: 0x5000
1340 - UInt32: 1 # Version
1341 - UInt32: 0x5050 # CodeMap
1342 - UInt32: 3 # CodeMapCount
1343 - UInt32: 0x5068 # CodeRangesToEntryPoints
1344 - UInt32: 0x5080 # RedirectionMetadata
1352 - UInt32: 0 # CodeRangesToEntryPointsCount
1353 - UInt32: 0 # RedirectionMetadataCount
1360 - UInt32: 0x1001 # CodeMap[0]
1362 - UInt32: 0x2000 # CodeMap[1]
1364 - UInt32: 0x3002 # CodeMap[2]
1367 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1368 VirtualAddress: 0x7000
1372 - UInt32: 1 # coff_dynamic_reloc_table.Version
1373 - UInt32: 24 # coff_dynamic_reloc_table.Size
1374 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1375 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1376 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
1377 - UInt32: 0x6000 # coff_base_reloc_block_header[0].PageRVA
1378 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1379 - Binary: 0140 # ZERO offset 0, size 2
1380 - Binary: 0000 # terminator
1384 # RUN: yaml2obj %s --docnum=19 -o %t19.dll
1385 # RUN: not llvm-readobj %t19.dll 2>&1 | FileCheck --check-prefix=ERR-INVALID-VERSION %s
1386 # ERR-INVALID-VERSION: Unsupported dynamic relocations table version (3)
1390 ImageBase: 0x180000000
1391 SectionAlignment: 4096
1393 DLLCharacteristics: [ ]
1395 RelativeVirtualAddress: 0x4000
1398 Machine: IMAGE_FILE_MACHINE_ARM64
1399 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1402 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1403 VirtualAddress: 0x1000
1406 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1407 VirtualAddress: 0x4000
1411 CHPEMetadataPointer: 0x180005000
1412 DynamicValueRelocTableOffset: 4
1413 DynamicValueRelocTableSection: 4
1415 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1416 VirtualAddress: 0x5000
1419 - UInt32: 1 # Version
1420 - UInt32: 0x5050 # CodeMap
1421 - UInt32: 3 # CodeMapCount
1422 - UInt32: 0x5068 # CodeRangesToEntryPoints
1423 - UInt32: 0x5080 # RedirectionMetadata
1431 - UInt32: 0 # CodeRangesToEntryPointsCount
1432 - UInt32: 0 # RedirectionMetadataCount
1439 - UInt32: 0x1001 # CodeMap[0]
1441 - UInt32: 0x2000 # CodeMap[1]
1443 - UInt32: 0x3002 # CodeMap[2]
1446 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1447 VirtualAddress: 0x7000
1451 - UInt32: 3 # coff_dynamic_reloc_table.Version
1452 - UInt32: 24 # coff_dynamic_reloc_table.Size
1453 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1454 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1455 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
1456 - UInt32: 0x6000 # coff_base_reloc_block_header[0].PageRVA
1457 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1458 - Binary: 0140 # ZERO offset 0, size 2
1459 - Binary: 0000 # terminator
1463 # RUN: yaml2obj %s --docnum=20 -o %t20.dll
1464 # RUN: not llvm-readobj %t20.dll 2>&1 | FileCheck --check-prefix=ERR-END %s
1465 # ERR-END: Unexpected end of ARM64X relocations
1469 ImageBase: 0x180000000
1470 SectionAlignment: 4096
1472 DLLCharacteristics: [ ]
1474 RelativeVirtualAddress: 0x5000
1477 Machine: IMAGE_FILE_MACHINE_ARM64
1478 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1481 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1482 VirtualAddress: 0x2000
1485 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1486 VirtualAddress: 0x5000
1490 CHPEMetadataPointer: 0x180005000
1491 DynamicValueRelocTableOffset: 4
1492 DynamicValueRelocTableSection: 4
1494 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1495 VirtualAddress: 0x6000
1498 - UInt32: 1 # Version
1499 - UInt32: 0x5050 # CodeMap
1500 - UInt32: 3 # CodeMapCount
1501 - UInt32: 0x5068 # CodeRangesToEntryPoints
1502 - UInt32: 0x5080 # RedirectionMetadata
1510 - UInt32: 0 # CodeRangesToEntryPointsCount
1511 - UInt32: 0 # RedirectionMetadataCount
1518 - UInt32: 0x1001 # CodeMap[0]
1520 - UInt32: 0x2000 # CodeMap[1]
1522 - UInt32: 0x3002 # CodeMap[2]
1525 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1526 VirtualAddress: 0x7000
1530 - UInt32: 1 # coff_dynamic_reloc_table.Version
1531 - UInt32: 24 # coff_dynamic_reloc_table.Size
1532 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1533 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1534 - UInt32: 12 # coff_dynamic_relocation64.BaseRelocSize
1535 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
1536 - UInt32: 12 # coff_base_reloc_block_header[0].BlockSize
1537 - Binary: 2490 # VALUE offset 0x24, size 4
1538 - Binary: 0000 # terminator
1542 # RUN: yaml2obj %s --docnum=21 -o %t21.dll
1543 # RUN: not llvm-readobj %t21.dll 2>&1 | FileCheck --check-prefix=ERR-TERMINATOR %s
1547 ImageBase: 0x180000000
1548 SectionAlignment: 4096
1550 DLLCharacteristics: [ ]
1552 RelativeVirtualAddress: 0x4000
1555 Machine: IMAGE_FILE_MACHINE_ARM64
1556 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
1559 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1560 VirtualAddress: 0x1000
1563 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1564 VirtualAddress: 0x4000
1568 CHPEMetadataPointer: 0x180005000
1569 DynamicValueRelocTableOffset: 4
1570 DynamicValueRelocTableSection: 4
1572 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
1573 VirtualAddress: 0x5000
1576 - UInt32: 1 # Version
1577 - UInt32: 0x5050 # CodeMap
1578 - UInt32: 3 # CodeMapCount
1579 - UInt32: 0x5068 # CodeRangesToEntryPoints
1580 - UInt32: 0x5080 # RedirectionMetadata
1588 - UInt32: 0 # CodeRangesToEntryPointsCount
1589 - UInt32: 0 # RedirectionMetadataCount
1596 - UInt32: 0x1001 # CodeMap[0]
1598 - UInt32: 0x2000 # CodeMap[1]
1600 - UInt32: 0x3002 # CodeMap[2]
1603 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
1604 VirtualAddress: 0x7000
1608 - UInt32: 1 # coff_dynamic_reloc_table.Version
1609 - UInt32: 28 # coff_dynamic_reloc_table.Size
1610 - UInt32: 6 # coff_dynamic_relocation64.Symbol(low) = IMAGE_DYNAMIC_RELOCATION_ARM64X
1611 - UInt32: 0 # coff_dynamic_relocation64.Symbol(high)
1612 - UInt32: 16 # coff_dynamic_relocation64.BaseRelocSize
1613 - UInt32: 0 # coff_base_reloc_block_header[0].PageRVA
1614 - UInt32: 16 # coff_base_reloc_block_header[0].BlockSize
1615 - Binary: 0040 # ZERO offset 0, size 2