1# This test tests that if two non-overlapping segments are right next to each 2# other no problems arise. 3 4# RUN: yaml2obj %s -o %t 5# RUN: llvm-objcopy %t %t2 6# RUN: llvm-readobj --program-headers %t2 | FileCheck %s 7 8!ELF 9FileHeader: 10 Class: ELFCLASS64 11 Data: ELFDATA2LSB 12 Type: ET_EXEC 13 Machine: EM_X86_64 14Sections: 15 - Name: .text 16 Type: SHT_PROGBITS 17 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 18 AddressAlign: 0x1000 19 Size: 24 20 - Name: .text2 21 Type: SHT_PROGBITS 22 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 23 AddressAlign: 0x10 24 Size: 16 25ProgramHeaders: 26 - Type: PT_LOAD 27 Flags: [ PF_X, PF_R ] 28 FirstSec: .text 29 LastSec: .text 30 - Type: PT_LOAD 31 Flags: [ PF_X, PF_R ] 32 FirstSec: .text2 33 LastSec: .text2 34 35#CHECK: ProgramHeaders [ 36#CHECK-NEXT: ProgramHeader { 37#CHECK-NEXT: Type: PT_LOAD (0x1) 38#CHECK-NEXT: Offset: 0x1000 39#CHECK-NEXT: VirtualAddress: 0x0 40#CHECK-NEXT: PhysicalAddress: 0x0 41#CHECK-NEXT: FileSize: 24 42#CHECK-NEXT: MemSize: 24 43#CHECK-NEXT: Flags [ (0x5) 44#CHECK-NEXT: PF_R (0x4) 45#CHECK-NEXT: PF_X (0x1) 46#CHECK-NEXT: ] 47#CHECK-NEXT: Alignment: 4096 48#CHECK-NEXT: } 49#CHECK-NEXT: ProgramHeader { 50#CHECK-NEXT: Type: PT_LOAD (0x1) 51#CHECK-NEXT: Offset: 0x1020 52#CHECK-NEXT: VirtualAddress: 0x0 53#CHECK-NEXT: PhysicalAddress: 0x0 54#CHECK-NEXT: FileSize: 16 55#CHECK-NEXT: MemSize: 16 56#CHECK-NEXT: Flags [ (0x5) 57#CHECK-NEXT: PF_R (0x4) 58#CHECK-NEXT: PF_X (0x1) 59#CHECK-NEXT: ] 60#CHECK-NEXT: Alignment: 16 61#CHECK-NEXT: } 62#CHECK-NEXT:] 63