2015-10-15 03:21:25 +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 %tout
|
2015-10-15 03:21:25 +08:00
|
|
|
# RUN: llvm-readobj -sections %tout | FileCheck %s
|
|
|
|
# REQUIRES: x86
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
.text
|
|
|
|
_start:
|
|
|
|
|
|
|
|
.section .text.a,"ax"
|
|
|
|
.section .text.,"ax"
|
|
|
|
.section .rodata.a,"a"
|
|
|
|
.section .rodata,"a"
|
|
|
|
.section .data.a,"aw"
|
|
|
|
.section .data,"aw"
|
|
|
|
.section .bss.a,"",@nobits
|
|
|
|
.section .bss,"",@nobits
|
|
|
|
.section .foo.a,"aw"
|
|
|
|
.section .foo,"aw"
|
2015-11-13 15:56:27 +08:00
|
|
|
.section .data.rel.ro,"aw",%progbits
|
|
|
|
.section .data.rel.ro.a,"aw",%progbits
|
|
|
|
.section .data.rel.ro.local,"aw",%progbits
|
|
|
|
.section .data.rel.ro.local.a,"aw",%progbits
|
2016-02-16 23:57:07 +08:00
|
|
|
.section .tbss.foo,"aGwT",@nobits,foo,comdat
|
2015-10-15 03:21:25 +08:00
|
|
|
|
|
|
|
// CHECK-NOT: Name: .rodata.a
|
|
|
|
// CHECK: Name: .rodata
|
|
|
|
// CHECK-NOT: Name: .text.a
|
|
|
|
// CHECK: Name: .text
|
2016-02-16 23:57:07 +08:00
|
|
|
// CHECK: Name: .tbss ({{.*}})
|
2015-11-24 18:15:50 +08:00
|
|
|
// CHECK-NOT: Name: .data.rel.ro.a
|
|
|
|
// CHECK-NOT: Name: .data.rel.ro.local.a
|
|
|
|
// CHECK: Name: .data.rel.ro
|
2015-10-15 03:21:25 +08:00
|
|
|
// CHECK-NOT: Name: .data.a
|
|
|
|
// CHECK: Name: .data
|
|
|
|
// CHECK: Name: .foo.a
|
|
|
|
// CHECK: Name: .foo
|
|
|
|
// CHECK-NOT: Name: .bss.a
|
|
|
|
// CHECK: Name: .bss
|