2015-10-25 06:51:01 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t.o -o %t.so -shared
|
2016-02-19 22:17:40 +08:00
|
|
|
// RUN: llvm-readobj -s -section-data %t.so | FileCheck %s
|
2015-10-25 06:51:01 +08:00
|
|
|
|
2016-02-19 22:17:40 +08:00
|
|
|
.section .rodata.foo,"aMS",@progbits,1
|
2015-10-25 06:51:01 +08:00
|
|
|
.align 16
|
|
|
|
.asciz "foo"
|
|
|
|
|
2016-02-19 22:17:40 +08:00
|
|
|
.section .rodata.foo2,"aMS",@progbits,1
|
|
|
|
.align 16
|
2015-10-25 06:51:01 +08:00
|
|
|
.asciz "foo"
|
|
|
|
|
2016-02-19 22:17:40 +08:00
|
|
|
.section .rodata.bar,"aMS",@progbits,1
|
|
|
|
.align 16
|
|
|
|
.asciz "bar"
|
|
|
|
|
2015-10-25 06:51:01 +08:00
|
|
|
// CHECK: Name: .rodata
|
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_MERGE
|
|
|
|
// CHECK-NEXT: SHF_STRINGS
|
|
|
|
// CHECK-NEXT: ]
|
2015-11-04 06:08:08 +08:00
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset:
|
2016-02-19 22:17:40 +08:00
|
|
|
// CHECK-NEXT: Size: 20
|
2015-10-25 06:51:01 +08:00
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
|
|
|
// CHECK-NEXT: AddressAlignment: 16
|
2016-02-19 22:17:40 +08:00
|
|
|
// CHECK-NEXT: EntrySize:
|
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 666F6F00 00000000 00000000 00000000 |foo.............|
|
|
|
|
// CHECK-NEXT: 0010: 62617200 |bar.|
|
|
|
|
// CHECK-NEXT: )
|
|
|
|
|
2017-02-03 21:06:18 +08:00
|
|
|
.section .rodata2,"aMS",@progbits,1
|
2016-02-19 22:17:40 +08:00
|
|
|
.asciz "foo"
|
2015-10-25 06:51:01 +08:00
|
|
|
|
2017-02-03 21:06:18 +08:00
|
|
|
// CHECK: Name: .rodata2
|
2015-10-25 06:51:01 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_MERGE
|
|
|
|
// CHECK-NEXT: SHF_STRINGS
|
|
|
|
// CHECK-NEXT: ]
|
2015-11-04 06:08:08 +08:00
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset:
|
2015-10-25 06:51:01 +08:00
|
|
|
// CHECK-NEXT: Size: 4
|
|
|
|
// CHECK-NEXT: Link: 0
|
|
|
|
// CHECK-NEXT: Info: 0
|
|
|
|
// CHECK-NEXT: AddressAlignment: 1
|
2016-02-19 22:17:40 +08:00
|
|
|
// CHECK-NEXT: EntrySize:
|
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 666F6F00 |foo.|
|
|
|
|
// CHECK-NEXT: )
|