1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/common.s -o %t2
4// RUN: ld.lld %t %t2 -o %t3
5// RUN: llvm-readobj --symbols -S %t3 | FileCheck %s
6
7// CHECK:      Name: .bss
8// CHECK-NEXT: Type: SHT_NOBITS
9// CHECK-NEXT: Flags [
10// CHECK-NEXT:   SHF_ALLOC
11// CHECK-NEXT:   SHF_WRITE
12// CHECK-NEXT: ]
13// CHECK-NEXT: Address: 0x202160
14// CHECK-NEXT: Offset:
15// CHECK-NEXT: Size: 36
16// CHECK-NEXT: Link: 0
17// CHECK-NEXT: Info: 0
18// CHECK-NEXT: AddressAlignment: 16
19
20// CHECK:      Name: sym1
21// CHECK-NEXT: Value: 0x202160
22// CHECK-NEXT: Size: 8
23// CHECK-NEXT: Binding: Global
24// CHECK-NEXT: Type: Object
25// CHECK-NEXT: Other: 0
26// CHECK-NEXT: Section: .bss
27
28// CHECK:      Name: sym2
29// CHECK-NEXT: Value: 0x202168
30// CHECK-NEXT: Size: 8
31// CHECK-NEXT: Binding: Global
32// CHECK-NEXT: Type: Object
33// CHECK-NEXT: Other: 0
34// CHECK-NEXT: Section: .bss
35
36// CHECK:      Name: sym3
37// CHECK-NEXT: Value: 0x202170
38// CHECK-NEXT: Size: 2
39// CHECK-NEXT: Binding: Global
40// CHECK-NEXT: Type: Object
41// CHECK-NEXT: Other: 0
42// CHECK-NEXT: Section: .bss
43
44// CHECK:      Name: sym4
45// CHECK-NEXT: Value: 0x202180
46// CHECK-NEXT: Size: 4
47// CHECK-NEXT: Binding: Global
48// CHECK-NEXT: Type: Object
49// CHECK-NEXT: Other: 0
50// CHECK-NEXT: Section: .bss
51
52
53.globl _start
54_start:
55
56.comm sym1,4,4
57.comm sym2,8,4
58.comm sym3,2,2
59.comm sym4,4,2
60