2015-08-31 09:16:19 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/common.s -o %t2
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t %t2 -o %t3
|
2015-09-01 06:55:21 +08:00
|
|
|
// RUN: llvm-readobj -t -s %t3 | FileCheck %s
|
2015-08-31 09:16:19 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
|
2015-09-01 06:55:21 +08:00
|
|
|
// CHECK: Name: .bss
|
|
|
|
// CHECK-NEXT: Type: SHT_NOBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_WRITE
|
|
|
|
// CHECK-NEXT: ]
|
2016-11-24 01:44:02 +08:00
|
|
|
// CHECK-NEXT: Address: 0x201000
|
2015-09-01 08:16:38 +08:00
|
|
|
// CHECK-NEXT: Offset:
|
2017-09-09 00:22:43 +08:00
|
|
|
// CHECK-NEXT: Size: 36
|
2016-03-08 01:43:39 +08:00
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
|
|
|
// CHECK-NEXT: AddressAlignment: 16
|
2015-09-01 06:55:21 +08:00
|
|
|
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK: Name: sym1
|
2017-09-09 00:22:43 +08:00
|
|
|
// CHECK-NEXT: Value: 0x201000
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK-NEXT: Size: 8
|
2015-09-01 09:19:12 +08:00
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: Object
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .bss
|
|
|
|
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK: Name: sym2
|
2017-09-09 00:22:43 +08:00
|
|
|
// CHECK-NEXT: Value: 0x201008
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK-NEXT: Size: 8
|
2015-09-01 08:16:38 +08:00
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: Object
|
|
|
|
// CHECK-NEXT: Other: 0
|
|
|
|
// CHECK-NEXT: Section: .bss
|
|
|
|
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK: Name: sym3
|
2017-09-09 00:22:43 +08:00
|
|
|
// CHECK-NEXT: Value: 0x201010
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK-NEXT: Size: 2
|
2015-08-31 09:16:19 +08:00
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: Object
|
|
|
|
// CHECK-NEXT: Other: 0
|
2015-09-01 06:33:21 +08:00
|
|
|
// CHECK-NEXT: Section: .bss
|
2015-08-31 09:16:19 +08:00
|
|
|
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK: Name: sym4
|
2017-09-09 00:22:43 +08:00
|
|
|
// CHECK-NEXT: Value: 0x201020
|
2015-09-18 02:26:25 +08:00
|
|
|
// CHECK-NEXT: Size: 4
|
2015-08-31 09:16:19 +08:00
|
|
|
// CHECK-NEXT: Binding: Global
|
|
|
|
// CHECK-NEXT: Type: Object
|
|
|
|
// CHECK-NEXT: Other: 0
|
2015-09-01 06:33:21 +08:00
|
|
|
// CHECK-NEXT: Section: .bss
|
2015-08-31 09:16:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
|
|
|
|
.comm sym1,4,4
|
|
|
|
.comm sym2,8,4
|
2015-09-01 08:16:38 +08:00
|
|
|
.comm sym3,2,2
|
2015-09-01 09:19:12 +08:00
|
|
|
.comm sym4,4,2
|