1 # This test tests how ParentSegment is set for Segments. In particular this test
2 # tests that if a chain of parents forms, the offsets are chosen for parents
3 # first despite the order of the list. It also tests multiple branches of the
4 # code that assigns parents.
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 ]
64 #CHECK: ProgramHeaders [
65 #CHECK-NEXT: ProgramHeader {
66 #CHECK-NEXT: Type: PT_LOAD (0x1)
67 #CHECK-NEXT: Offset: 0x1000
68 #CHECK-NEXT: VirtualAddress: 0x0
69 #CHECK-NEXT: PhysicalAddress: 0x0
70 #CHECK-NEXT: FileSize: 8192
71 #CHECK-NEXT: MemSize: 8192
72 #CHECK-NEXT: Flags [ (0x5)
73 #CHECK-NEXT: PF_R (0x4)
74 #CHECK-NEXT: PF_X (0x1)
76 #CHECK-NEXT: Alignment: 4096
78 #CHECK-NEXT: ProgramHeader {
79 #CHECK-NEXT: Type: PT_LOAD (0x1)
80 #CHECK-NEXT: Offset: 0x4000
81 #CHECK-NEXT: VirtualAddress: 0x0
82 #CHECK-NEXT: PhysicalAddress: 0x0
83 #CHECK-NEXT: FileSize: 8192
84 #CHECK-NEXT: MemSize: 8192
85 #CHECK-NEXT: Flags [ (0x5)
86 #CHECK-NEXT: PF_R (0x4)
87 #CHECK-NEXT: PF_X (0x1)
89 #CHECK-NEXT: Alignment: 4096
91 #CHECK-NEXT: ProgramHeader {
92 #CHECK-NEXT: Type: PT_LOAD (0x1)
93 #CHECK-NEXT: Offset: 0x3000
94 #CHECK-NEXT: VirtualAddress: 0x0
95 #CHECK-NEXT: PhysicalAddress: 0x0
96 #CHECK-NEXT: FileSize: 8192
97 #CHECK-NEXT: MemSize: 8192
98 #CHECK-NEXT: Flags [ (0x5)
99 #CHECK-NEXT: PF_R (0x4)
100 #CHECK-NEXT: PF_X (0x1)
102 #CHECK-NEXT: Alignment: 4096
104 #CHECK-NEXT: ProgramHeader {
105 #CHECK-NEXT: Type: PT_LOAD (0x1)
106 #CHECK-NEXT: Offset: 0x2000
107 #CHECK-NEXT: VirtualAddress: 0x0
108 #CHECK-NEXT: PhysicalAddress: 0x0
109 #CHECK-NEXT: FileSize: 8192
110 #CHECK-NEXT: MemSize: 8192
111 #CHECK-NEXT: Flags [ (0x5)
112 #CHECK-NEXT: PF_R (0x4)
113 #CHECK-NEXT: PF_X (0x1)
115 #CHECK-NEXT: Alignment: 4096