Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / yaml2obj / program-header-align.yaml
blob88b5d2722e0fee0be8767dfdbde459d42d350c49
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-readobj -l %t | FileCheck %s
4 !ELF
5 FileHeader:
6   Class:           ELFCLASS64
7   Data:            ELFDATA2LSB
8   Type:            ET_EXEC
9   Machine:         EM_X86_64
10 Sections:
11   - Name:            .text
12     Type:            SHT_PROGBITS
13     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
14     AddressAlign:    0x0000000000000008
15     Content:         "00000000"
16   - Name:            .data
17     Type:            SHT_PROGBITS
18     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
19     Content:         "00000000"
20     AddressAlign:    0x0000000000000010
21 ProgramHeaders:
22   - Type: PT_LOAD
23     Flags: [ PF_X, PF_R ]
24     VAddr: 0xAAAA1030
25     PAddr: 0xFFFF1030
26     Align: 0x1000
27     Sections:
28       - Section: .text
29   - Type: PT_LOAD
30     Flags: [ PF_R ]
31     VAddr: 0xAAAA2040
32     PAddr: 0xFFFF2040
33     Align: 0x1000
34     Sections:
35       - Section: .data
37 #CHECK:     ProgramHeaders [
38 #CHECK-NEXT:   ProgramHeader {
39 #CHECK-NEXT:    Type: PT_LOAD
40 #CHECK-NEXT:    Offset: 0x230
41 #CHECK-NEXT:    VirtualAddress: 0xAAAA1030
42 #CHECK-NEXT:    PhysicalAddress: 0xFFFF1030
43 #CHECK-NEXT:    FileSize: 4
44 #CHECK-NEXT:    MemSize: 4
45 #CHECK-NEXT:    Flags [
46 #CHECK-NEXT:      PF_R
47 #CHECK-NEXT:      PF_X
48 #CHECK-NEXT:    ]
49 #CHECK-NEXT:    Alignment: 4096
50 #CHECK-NEXT:  }
51 #CHECK-NEXT:  ProgramHeader {
52 #CHECK-NEXT:    Type: PT_LOAD
53 #CHECK-NEXT:    Offset: 0x240
54 #CHECK-NEXT:    VirtualAddress: 0xAAAA2040
55 #CHECK-NEXT:    PhysicalAddress: 0xFFFF2040
56 #CHECK-NEXT:    FileSize: 4
57 #CHECK-NEXT:    MemSize: 4
58 #CHECK-NEXT:    Flags [
59 #CHECK-NEXT:      PF_R
60 #CHECK-NEXT:    ]
61 #CHECK-NEXT:    Alignment: 4096
62 #CHECK-NEXT:  }
63 #CHECK-NEXT:]