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: ]
|
2015-09-10 23:41:34 +08:00
|
|
|
// CHECK-NEXT: Address: 0x11000
|
2015-09-01 08:16:38 +08:00
|
|
|
// CHECK-NEXT: Offset:
|
2015-09-01 09:19:12 +08:00
|
|
|
// CHECK-NEXT: Size: 22
|
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
|
|
|
|
// CHECK-NEXT: Value: 0x11004
|
|
|
|
// 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
|
|
|
|
// CHECK-NEXT: Value: 0x1100C
|
|
|
|
// 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
|
|
|
|
// CHECK-NEXT: Value: 0x11014
|
|
|
|
// 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
|
|
|
|
// CHECK-NEXT: Value: 0x11000
|
|
|
|
// 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
|