1 # This test tests that each segment is assigned a canonical parent segment.
2 # Importantly if two segments could be the parent segment of a segment this test
3 # should cover the case where a new parent replaces the old parent and the case
4 # where an old parent is not replaced by a new parent.
6 # RUN: yaml2obj %s -o %t
7 # RUN: llvm-objcopy %t %t2
8 # RUN: llvm-readobj --program-headers %t2 | FileCheck %s
19 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
24 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
29 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
34 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
39 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
60 #CHECK: ProgramHeaders [
61 #CHECK-NEXT: ProgramHeader {
62 #CHECK-NEXT: Type: PT_LOAD (0x1)
63 #CHECK-NEXT: Offset: 0x4000
64 #CHECK-NEXT: VirtualAddress: 0x0
65 #CHECK-NEXT: PhysicalAddress: 0x0
66 #CHECK-NEXT: FileSize: 8192
67 #CHECK-NEXT: MemSize: 8192
68 #CHECK-NEXT: Flags [ (0x5)
69 #CHECK-NEXT: PF_R (0x4)
70 #CHECK-NEXT: PF_X (0x1)
72 #CHECK-NEXT: Alignment: 4096
74 #CHECK-NEXT: ProgramHeader {
75 #CHECK-NEXT: Type: PT_LOAD (0x1)
76 #CHECK-NEXT: Offset: 0x3000
77 #CHECK-NEXT: VirtualAddress: 0x0
78 #CHECK-NEXT: PhysicalAddress: 0x0
79 #CHECK-NEXT: FileSize: 12288
80 #CHECK-NEXT: MemSize: 12288
81 #CHECK-NEXT: Flags [ (0x5)
82 #CHECK-NEXT: PF_R (0x4)
83 #CHECK-NEXT: PF_X (0x1)
85 #CHECK-NEXT: Alignment: 4096
87 #CHECK-NEXT: ProgramHeader {
88 #CHECK-NEXT: Type: PT_LOAD (0x1)
89 #CHECK-NEXT: Offset: 0x1000
90 #CHECK-NEXT: VirtualAddress: 0x0
91 #CHECK-NEXT: PhysicalAddress: 0x0
92 #CHECK-NEXT: FileSize: 20480
93 #CHECK-NEXT: MemSize: 20480
94 #CHECK-NEXT: Flags [ (0x5)
95 #CHECK-NEXT: PF_R (0x4)
96 #CHECK-NEXT: PF_X (0x1)
98 #CHECK-NEXT: Alignment: 4096
100 #CHECK-NEXT: ProgramHeader {
101 #CHECK-NEXT: Type: PT_LOAD (0x1)
102 #CHECK-NEXT: Offset: 0x2000
103 #CHECK-NEXT: VirtualAddress: 0x0
104 #CHECK-NEXT: PhysicalAddress: 0x0
105 #CHECK-NEXT: FileSize: 16384
106 #CHECK-NEXT: MemSize: 16384
107 #CHECK-NEXT: Flags [ (0x5)
108 #CHECK-NEXT: PF_R (0x4)
109 #CHECK-NEXT: PF_X (0x1)
111 #CHECK-NEXT: Alignment: 4096