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 ]
70 #CHECK: ProgramHeaders [
71 #CHECK-NEXT: ProgramHeader {
72 #CHECK-NEXT: Type: PT_LOAD (0x1)
73 #CHECK-NEXT: Offset: 0x4000
74 #CHECK-NEXT: VirtualAddress: 0x0
75 #CHECK-NEXT: PhysicalAddress: 0x0
76 #CHECK-NEXT: FileSize: 8192
77 #CHECK-NEXT: MemSize: 8192
78 #CHECK-NEXT: Flags [ (0x5)
79 #CHECK-NEXT: PF_R (0x4)
80 #CHECK-NEXT: PF_X (0x1)
82 #CHECK-NEXT: Alignment: 4096
84 #CHECK-NEXT: ProgramHeader {
85 #CHECK-NEXT: Type: PT_LOAD (0x1)
86 #CHECK-NEXT: Offset: 0x3000
87 #CHECK-NEXT: VirtualAddress: 0x0
88 #CHECK-NEXT: PhysicalAddress: 0x0
89 #CHECK-NEXT: FileSize: 12288
90 #CHECK-NEXT: MemSize: 12288
91 #CHECK-NEXT: Flags [ (0x5)
92 #CHECK-NEXT: PF_R (0x4)
93 #CHECK-NEXT: PF_X (0x1)
95 #CHECK-NEXT: Alignment: 4096
97 #CHECK-NEXT: ProgramHeader {
98 #CHECK-NEXT: Type: PT_LOAD (0x1)
99 #CHECK-NEXT: Offset: 0x1000
100 #CHECK-NEXT: VirtualAddress: 0x0
101 #CHECK-NEXT: PhysicalAddress: 0x0
102 #CHECK-NEXT: FileSize: 20480
103 #CHECK-NEXT: MemSize: 20480
104 #CHECK-NEXT: Flags [ (0x5)
105 #CHECK-NEXT: PF_R (0x4)
106 #CHECK-NEXT: PF_X (0x1)
108 #CHECK-NEXT: Alignment: 4096
110 #CHECK-NEXT: ProgramHeader {
111 #CHECK-NEXT: Type: PT_LOAD (0x1)
112 #CHECK-NEXT: Offset: 0x2000
113 #CHECK-NEXT: VirtualAddress: 0x0
114 #CHECK-NEXT: PhysicalAddress: 0x0
115 #CHECK-NEXT: FileSize: 16384
116 #CHECK-NEXT: MemSize: 16384
117 #CHECK-NEXT: Flags [ (0x5)
118 #CHECK-NEXT: PF_R (0x4)
119 #CHECK-NEXT: PF_X (0x1)
121 #CHECK-NEXT: Alignment: 4096