2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: x86
|
2015-09-01 04:23:57 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t -o %t2
|
2015-09-01 04:23:57 +08:00
|
|
|
// RUN: llvm-readobj -sections %t2 | FileCheck %s
|
|
|
|
|
|
|
|
// Test that bss takes no space on disk.
|
|
|
|
|
|
|
|
// CHECK: Name: .bss
|
|
|
|
// CHECK-NEXT: Type: SHT_NOBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_WRITE
|
|
|
|
// CHECK-NEXT: ]
|
2016-12-06 04:42:58 +08:00
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset: 0x[[OFFSET:.*]]
|
2015-09-01 04:23:57 +08:00
|
|
|
// CHECK-NEXT: Size: 4
|
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
2015-11-04 03:56:47 +08:00
|
|
|
// CHECK-NEXT: AddressAlignment:
|
2015-09-01 04:23:57 +08:00
|
|
|
// CHECK-NEXT: EntrySize: 0
|
|
|
|
// CHECK-NEXT: }
|
2016-12-06 04:42:58 +08:00
|
|
|
// CHECK-NEXT: Section {
|
|
|
|
// CHECK-NEXT: Index:
|
|
|
|
// CHECK-NEXT: Name:
|
|
|
|
// CHECK-NEXT: Type:
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_MERGE
|
|
|
|
// CHECK-NEXT: SHF_STRINGS
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset: 0x[[OFFSET]]
|
2015-09-01 04:23:57 +08:00
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
|
|
|
|
.bss
|
|
|
|
.zero 4
|