2 // RUN
: llvm-mc
-filetype
=obj
-triple
=x86_64-unknown-linux
%s
-o
%t
3 // RUN
: ld.lld
%t -o
%tout
4 // RUN
: llvm-readobj
-l %tout | FileCheck
%s
10 .section .tbss,"awT",@nobits
12 // FIXME
: Test that we don
't create unecessary empty PT_LOAD and PT_GNU_RELRO
13 // for the .tbss section.
15 // CHECK: ProgramHeaders [
16 // CHECK-NEXT: ProgramHeader {
17 // CHECK-NEXT: Type: PT_PHDR (0x6)
18 // CHECK-NEXT: Offset: 0x40
19 // CHECK-NEXT: VirtualAddress: 0x200040
20 // CHECK-NEXT: PhysicalAddress: 0x200040
21 // CHECK-NEXT: FileSize: 280
22 // CHECK-NEXT: MemSize: 280
23 // CHECK-NEXT: Flags [ (0x4)
24 // CHECK-NEXT: PF_R (0x4)
26 // CHECK-NEXT: Alignment: 8
28 // CHECK-NEXT: ProgramHeader {
29 // CHECK-NEXT: Type: PT_LOAD (0x1)
30 // CHECK-NEXT: Offset: 0x0
31 // CHECK-NEXT: VirtualAddress: 0x200000
32 // CHECK-NEXT: PhysicalAddress: 0x200000
33 // CHECK-NEXT: FileSize: 344
34 // CHECK-NEXT: MemSize: 344
35 // CHECK-NEXT: Flags [ (0x4)
36 // CHECK-NEXT: PF_R (0x4)
38 // CHECK-NEXT: Alignment: 4096
40 // CHECK-NEXT: ProgramHeader {
41 // CHECK-NEXT: Type: PT_LOAD (0x1)
42 // CHECK-NEXT: Offset: 0x158
43 // CHECK-NEXT: VirtualAddress: 0x201158
44 // CHECK-NEXT: PhysicalAddress: 0x201158
45 // CHECK-NEXT: FileSize: 1
46 // CHECK-NEXT: MemSize: 1
47 // CHECK-NEXT: Flags [ (0x5)
48 // CHECK-NEXT: PF_R (0x4)
49 // CHECK-NEXT: PF_X (0x1)
51 // CHECK-NEXT: Alignment: 4096
53 // CHECK-NEXT: ProgramHeader {
54 // CHECK-NEXT: Type: PT_TLS (0x7)
55 // CHECK-NEXT: Offset: 0x159
56 // CHECK-NEXT: VirtualAddress: 0x201159
57 // CHECK-NEXT: PhysicalAddress: 0x201159
58 // CHECK-NEXT: FileSize: 0
59 // CHECK-NEXT: MemSize: 4
60 // CHECK-NEXT: Flags [ (0x4)
61 // CHECK-NEXT: PF_R (0x4)
63 // CHECK-NEXT: Alignment: 1
65 // CHECK-NEXT: ProgramHeader {
66 // CHECK-NEXT: Type: PT_GNU_STACK (0x6474E551)
67 // CHECK-NEXT: Offset: 0x0
68 // CHECK-NEXT: VirtualAddress: 0x0
69 // CHECK-NEXT: PhysicalAddress: 0x0
70 // CHECK-NEXT: FileSize: 0
71 // CHECK-NEXT: MemSize: 0
72 // CHECK-NEXT: Flags [ (0x6)
73 // CHECK-NEXT: PF_R (0x4)
74 // CHECK-NEXT: PF_W (0x2)
76 // CHECK-NEXT: Alignment: 0