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