1# RUN: yaml2obj %s -o %t
2# RUN: llvm-readobj --file-headers %t | FileCheck %s
3# RUN: obj2yaml %t | FileCheck %s --check-prefix=ROUNDTRIP
4
5# CHECK: OptionalHeaderSize: 240
6# CHECK: ImageBase: 0x140000000
7
8# ROUNDTRIP: ImageBase: 5368709120
9# ROUNDTRIP: VirtualAddress:  4096
10# ROUNDTRIP: VirtualAddress:  8192
11# ROUNDTRIP: VirtualAddress:  12288
12
13--- !COFF
14OptionalHeader:
15  AddressOfEntryPoint: 4096
16  ImageBase:       5368709120
17  SectionAlignment: 4096
18  FileAlignment:   512
19  MajorOperatingSystemVersion: 6
20  MinorOperatingSystemVersion: 0
21  MajorImageVersion: 0
22  MinorImageVersion: 0
23  MajorSubsystemVersion: 6
24  MinorSubsystemVersion: 0
25  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
26  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
27  SizeOfStackReserve: 1048576
28  SizeOfStackCommit: 4096
29  SizeOfHeapReserve: 1048576
30  SizeOfHeapCommit: 4096
31  ExportTable:
32    RelativeVirtualAddress: 0
33    Size:            0
34  ImportTable:
35    RelativeVirtualAddress: 0
36    Size:            0
37  ResourceTable:
38    RelativeVirtualAddress: 0
39    Size:            0
40  ExceptionTable:
41    RelativeVirtualAddress: 12288
42    Size:            8
43  CertificateTable:
44    RelativeVirtualAddress: 0
45    Size:            0
46  BaseRelocationTable:
47    RelativeVirtualAddress: 0
48    Size:            0
49  Debug:
50    RelativeVirtualAddress: 0
51    Size:            0
52  Architecture:
53    RelativeVirtualAddress: 0
54    Size:            0
55  GlobalPtr:
56    RelativeVirtualAddress: 0
57    Size:            0
58  TlsTable:
59    RelativeVirtualAddress: 0
60    Size:            0
61  LoadConfigTable:
62    RelativeVirtualAddress: 0
63    Size:            0
64  BoundImport:
65    RelativeVirtualAddress: 0
66    Size:            0
67  IAT:
68    RelativeVirtualAddress: 0
69    Size:            0
70  DelayImportDescriptor:
71    RelativeVirtualAddress: 0
72    Size:            0
73  ClrRuntimeHeader:
74    RelativeVirtualAddress: 0
75    Size:            0
76header:
77  Machine:         IMAGE_FILE_MACHINE_ARM64
78  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
79sections:
80  - Name:            .text
81    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
82    VirtualAddress:  4096
83    VirtualSize:     4
84    SectionData:     C0035FD6
85  - Name:            .rdata
86    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
87    VirtualAddress:  8192
88    VirtualSize:     12
89    SectionData:     0100400800000000E4E3E3E3
90  - Name:            .pdata
91    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
92    VirtualAddress:  12288
93    VirtualSize:     8
94    SectionData:     '0010000000200000'
95symbols:         []
96...
97