1// REQUIRES: x86
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 -s %tout | FileCheck %s
5
6        .global _start
7_start:
8        retq
9
10        .section        .tdata,"awT",@progbits
11        .align  4
12        .long   42
13
14        .section        .tbss,"awT",@nobits
15        .align  16
16        .zero 16
17
18        .data
19        .long 1
20
21
22// Test that .tbss doesn't show up in the offset or in the address. If this
23// gets out of sync what we get a runtime is different from what the section
24// table says.
25
26// CHECK:      Name: .tdata
27// CHECK-NEXT: Type: SHT_PROGBITS
28// CHECK-NEXT: Flags [
29// CHECK-NEXT:   SHF_ALLOC
30// CHECK-NEXT:   SHF_TLS
31// CHECK-NEXT:   SHF_WRITE
32// CHECK-NEXT: ]
33// CHECK-NEXT: Address: 0x202000
34// CHECK-NEXT: Offset: 0x2000
35// CHECK-NEXT: Size: 4
36
37// CHECK:      Name: .tbss
38// CHECK-NEXT: Type: SHT_NOBITS
39// CHECK-NEXT: Flags [
40// CHECK-NEXT:   SHF_ALLOC
41// CHECK-NEXT:   SHF_TLS
42// CHECK-NEXT:   SHF_WRITE
43// CHECK-NEXT: ]
44// CHECK-NEXT: Address: 0x202010
45// CHECK-NEXT: Offset: 0x2004
46// CHECK-NEXT: Size: 16
47
48// CHECK:      Name: .data
49// CHECK-NEXT: Type: SHT_PROGBITS
50// CHECK-NEXT: Flags [
51// CHECK-NEXT:   SHF_ALLOC
52// CHECK-NEXT:   SHF_WRITE
53// CHECK-NEXT: ]
54// CHECK-NEXT: Address: 0x202004
55// CHECK-NEXT: Offset: 0x2004
56// CHECK-NEXT: Size: 4
57