1# RUN: yaml2obj %s -o %t 2# RUN: llvm-readobj -program-headers %t | FileCheck %s 3 4!ELF 5FileHeader: 6 Class: ELFCLASS64 7 Data: ELFDATA2LSB 8 Type: ET_EXEC 9 Machine: EM_X86_64 10Sections: 11 - Name: .text 12 Type: SHT_PROGBITS 13 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 14 AddressAlign: 0x0000000000001000 15 Content: "00000000" 16 - Name: .init 17 Type: SHT_PROGBITS 18 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 19 Content: "00000000" 20 AddressAlign: 0x0000000000000010 21 - Name: .data 22 Type: SHT_PROGBITS 23 Flags: [ SHF_ALLOC ] 24 Content: "00000000" 25 AddressAlign: 0x0000000000001000 26ProgramHeaders: 27 - Type: PT_LOAD 28 Flags: [ PF_X, PF_R ] 29 VAddr: 0xAAAA1000 30 PAddr: 0xFFFF1000 31 Sections: 32 - Section: .text 33 - Section: .init 34 - Type: PT_LOAD 35 Flags: [ PF_R ] 36 VAddr: 0xAAAA2000 37 PAddr: 0xFFFF2000 38 Sections: 39 - Section: .data 40 41#CHECK: ProgramHeaders [ 42#CHECK-NEXT: ProgramHeader { 43#CHECK-NEXT: Type: PT_LOAD 44#CHECK-NEXT: Offset: 0x1000 45#CHECK-NEXT: VirtualAddress: 0xAAAA1000 46#CHECK-NEXT: PhysicalAddress: 0xFFFF1000 47#CHECK-NEXT: FileSize: 20 48#CHECK-NEXT: MemSize: 20 49#CHECK-NEXT: Flags [ 50#CHECK-NEXT: PF_R 51#CHECK-NEXT: PF_X 52#CHECK-NEXT: ] 53#CHECK-NEXT: Alignment: 4096 54#CHECK-NEXT: } 55#CHECK-NEXT: ProgramHeader { 56#CHECK-NEXT: Type: PT_LOAD 57#CHECK-NEXT: Offset: 0x2000 58#CHECK-NEXT: VirtualAddress: 0xAAAA2000 59#CHECK-NEXT: PhysicalAddress: 0xFFFF2000 60#CHECK-NEXT: FileSize: 4 61#CHECK-NEXT: MemSize: 4 62#CHECK-NEXT: Flags [ 63#CHECK-NEXT: PF_R 64#CHECK-NEXT: ] 65#CHECK-NEXT: Alignment: 4096 66#CHECK-NEXT: } 67#CHECK-NEXT:] 68