2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: x86
|
2015-08-12 08:00:24 +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
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj --sections %t2 | FileCheck %s
|
2015-08-12 08:00:24 +08:00
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
|
2017-01-05 22:20:35 +08:00
|
|
|
.section foobar,"",@progbits
|
2015-08-14 01:04:50 +08:00
|
|
|
|
2015-08-13 23:23:46 +08:00
|
|
|
.section bar, "a"
|
2015-08-13 22:45:44 +08:00
|
|
|
|
2015-08-13 23:23:46 +08:00
|
|
|
// Both sections are in the output and that the alloc section is first:
|
|
|
|
// CHECK: Name: bar
|
2015-08-14 01:04:50 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: ]
|
2016-11-24 01:44:02 +08:00
|
|
|
// CHECK-NEXT: Address: 0x200120
|
2015-08-13 23:23:46 +08:00
|
|
|
|
|
|
|
// CHECK: Name: foobar
|
2015-08-14 01:04:50 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x0
|
|
|
|
|
|
|
|
// CHECK-NOT: Name: foobar
|