2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: ld.lld %t -o %t2
4 # RUN: llvm-readobj --sections -l %t2 | FileCheck %s
6 # Check that different output sections with the same flags are merged into a
7 # single Read/Write PT_LOAD.
21 # CHECK-NEXT: Type: SHT_PROGBITS
23 # CHECK-NEXT: SHF_ALLOC
25 # CHECK-NEXT: Address:
26 # CHECK-NEXT: Offset: 0x158
30 # CHECK-NEXT: AddressAlignment:
31 # CHECK-NEXT: EntrySize:
34 # CHECK: ProgramHeaders [
35 # CHECK-NEXT: ProgramHeader {
36 # CHECK-NEXT: Type: PT_PHDR (0x6)
37 # CHECK-NEXT: Offset: 0x40
38 # CHECK-NEXT: VirtualAddress: 0x200040
39 # CHECK-NEXT: PhysicalAddress: 0x200040
40 # CHECK-NEXT: FileSize: 280
41 # CHECK-NEXT: MemSize: 280
42 # CHECK-NEXT: Flags [ (0x4)
43 # CHECK-NEXT: PF_R (0x4)
45 # CHECK-NEXT: Alignment: 8
47 # CHECK-NEXT: ProgramHeader {
48 # CHECK-NEXT: Type: PT_LOAD
49 # CHECK-NEXT: Offset: 0x0
50 # CHECK-NEXT: VirtualAddress:
51 # CHECK-NEXT: PhysicalAddress:
52 # CHECK-NEXT: FileSize: 352
53 # CHECK-NEXT: MemSize: 352
57 # CHECK-NEXT: Alignment:
59 # CHECK-NEXT: ProgramHeader {
60 # CHECK-NEXT: Type: PT_LOAD
62 # CHECK-NEXT: VirtualAddress:
63 # CHECK-NEXT: PhysicalAddress:
64 # CHECK-NEXT: FileSize: 16
65 # CHECK-NEXT: MemSize: 16
70 # CHECK-NEXT: Alignment:
72 # CHECK-NEXT: ProgramHeader {
73 # CHECK-NEXT: Type: PT_GNU_STACK
74 # CHECK-NEXT: Offset: 0x0
75 # CHECK-NEXT: VirtualAddress: 0x0
76 # CHECK-NEXT: PhysicalAddress: 0x0
77 # CHECK-NEXT: FileSize: 0
78 # CHECK-NEXT: MemSize: 0
83 # CHECK-NEXT: Alignment: 0