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 ]
60 #CHECK: ProgramHeaders [
61 #CHECK-NEXT: ProgramHeader {
62 #CHECK-NEXT: Type: PT_LOAD (0x1)
63 #CHECK-NEXT: Offset: 0x1000
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: 0x4000
77 #CHECK-NEXT: VirtualAddress: 0x0
78 #CHECK-NEXT: PhysicalAddress: 0x0
79 #CHECK-NEXT: FileSize: 8192
80 #CHECK-NEXT: MemSize: 8192
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: 0x3000
90 #CHECK-NEXT: VirtualAddress: 0x0
91 #CHECK-NEXT: PhysicalAddress: 0x0
92 #CHECK-NEXT: FileSize: 8192
93 #CHECK-NEXT: MemSize: 8192
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: 8192
106 #CHECK-NEXT: MemSize: 8192
107 #CHECK-NEXT: Flags [ (0x5)
108 #CHECK-NEXT: PF_R (0x4)
109 #CHECK-NEXT: PF_X (0x1)
111 #CHECK-NEXT: Alignment: 4096