1 ## Show how yaml2obj sets physical and virtual addresses of program headers.
3 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-readelf --sections --segments %t | FileCheck %s
6 # CHECK: Section Headers:
7 # CHECK: [Nr] Name Type Address Off Size ES Flg
8 # CHECK: [ 1] .foo PROGBITS 0000000000001234 000120 000001 00 A
10 # CHECK: Program Headers:
11 # CHECK-NEXT: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
12 # CHECK-NEXT: LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 R E 0x1
13 # CHECK-NEXT: LOAD 0x000120 0x0000000000000000 0x0000000000000000 0x000001 0x000001 R E 0x1
14 # CHECK-NEXT: LOAD 0x000120 0x00000000aaaa1000 0x00000000aaaa1000 0x000001 0x000001 R E 0x1
15 # CHECK-NEXT: LOAD 0x000120 0x00000000aaaa1000 0x00000000bbbb2000 0x000001 0x000001 R E 0x1
29 ## Show what virtual and physical address we set by default for the case where
30 ## a program header has no sections.
33 ## Show what virtual and physical address we set by default for the case
34 ## where a program header includes a section with a virtual address that
40 ## Now we have a program header that has a virtual address different to
41 ## the address of the section included. Show that the default physical address
42 ## is equal to the program header's virtual address.
48 ## Show that we are able to set different virtual and physical addresses.