1 # This test simply tests a simple but common real world example of overlapping
4 # RUN: llvm-objcopy %p/Inputs/pt-phdr.elf %t
5 # RUN: llvm-readobj --program-headers %t | FileCheck %s
7 #CHECK: ProgramHeaders [
8 #CHECK-NEXT: ProgramHeader {
9 #CHECK-NEXT: Type: PT_PHDR
10 #CHECK-NEXT: Offset: 0x40
11 #CHECK-NEXT: VirtualAddress: 0x200040
12 #CHECK-NEXT: PhysicalAddress: 0x200040
13 #CHECK-NEXT: FileSize: 280
14 #CHECK-NEXT: MemSize: 280
18 #CHECK-NEXT: Alignment: 8
20 #CHECK-NEXT: ProgramHeader {
21 #CHECK-NEXT: Type: PT_LOAD
22 #CHECK-NEXT: Offset: 0x0
23 #CHECK-NEXT: VirtualAddress: 0x200000
24 #CHECK-NEXT: PhysicalAddress: 0x200000
25 #CHECK-NEXT: FileSize: 344
26 #CHECK-NEXT: MemSize: 344
30 #CHECK-NEXT: Alignment: 4096
32 #CHECK-NEXT: ProgramHeader {
33 #CHECK-NEXT: Type: PT_LOAD
34 #CHECK-NEXT: Offset: 0x1000
35 #CHECK-NEXT: VirtualAddress: 0x201000
36 #CHECK-NEXT: PhysicalAddress: 0x201000
37 #CHECK-NEXT: FileSize: 1
38 #CHECK-NEXT: MemSize: 1
43 #CHECK-NEXT: Alignment: 4096
45 #CHECK-NEXT: ProgramHeader {
46 #CHECK-NEXT: Type: PT_LOAD
47 #CHECK-NEXT: Offset: 0x2000
48 #CHECK-NEXT: VirtualAddress: 0x202000
49 #CHECK-NEXT: PhysicalAddress: 0x202000
50 #CHECK-NEXT: FileSize: 14
51 #CHECK-NEXT: MemSize: 14
56 #CHECK-NEXT: Alignment: 4096
58 #CHECK-NEXT: ProgramHeader {
59 #CHECK-NEXT: Type: PT_GNU_STACK (0x6474E551)
60 #CHECK-NEXT: Offset: 0x0
61 #CHECK-NEXT: VirtualAddress: 0x0
62 #CHECK-NEXT: PhysicalAddress: 0x0
63 #CHECK-NEXT: FileSize: 0
64 #CHECK-NEXT: MemSize: 0
69 #CHECK-NEXT: Alignment: 0