2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "PHDRS {all PT_LOAD FILEHDR PHDRS FLAGS (1 | 1 + 0x1);} \
5 # RUN: . = 0x10000200; \
6 # RUN: .text : {*(.text*)} :all \
7 # RUN: .foo : {*(.foo.*)} :all \
8 # RUN: .data : {*(.data.*)} :all}" > %t.script
9 # RUN: ld.lld -o %t1 --script %t.script %t
10 # RUN: llvm-readobj -l %t1 | FileCheck %s
12 # RUN: echo "PHDRS {all PT_LOAD FILEHDR PHDRS FLAGS (0x1);} \
14 # RUN: . = 0x10000200; \
15 # RUN: .text : {*(.text*)} :all \
16 # RUN: .foo : {*(.foo.*)} \
17 # RUN: .data : {*(.data.*)} }" > %t.script
18 # RUN: ld.lld -o %t1 --script %t.script %t
19 # RUN: llvm-readobj -l %t1 | FileCheck --check-prefix=DEFHDR %s
21 # CHECK: ProgramHeaders [
22 # CHECK-NEXT: ProgramHeader {
23 # CHECK-NEXT: Type: PT_LOAD (0x1)
24 # CHECK-NEXT: Offset: 0x0
25 # CHECK-NEXT: VirtualAddress: 0x10000000
26 # CHECK-NEXT: PhysicalAddress: 0x10000000
27 # CHECK-NEXT: FileSize: 521
28 # CHECK-NEXT: MemSize: 521
30 # CHECK-NEXT: PF_W (0x2)
31 # CHECK-NEXT: PF_X (0x1)
34 # DEFHDR: ProgramHeaders [
35 # DEFHDR-NEXT: ProgramHeader {
36 # DEFHDR-NEXT: Type: PT_LOAD (0x1)
37 # DEFHDR-NEXT: Offset: 0x0
38 # DEFHDR-NEXT: VirtualAddress: 0x10000000
39 # DEFHDR-NEXT: PhysicalAddress: 0x10000000
40 # DEFHDR-NEXT: FileSize: 521
41 # DEFHDR-NEXT: MemSize: 521
42 # DEFHDR-NEXT: Flags [ (0x1)
43 # DEFHDR-NEXT: PF_X (0x1)
45 # DEFHDR-NEXT: Alignment: 4096