2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: amdgpu
|
2016-01-07 12:22:24 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri %s -o %t.o
|
2017-06-06 04:57:17 +08:00
|
|
|
# RUN: ld.lld -shared %t.o -o %t
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --sections --symbols -l %t | FileCheck %s
|
2016-01-07 11:59:08 +08:00
|
|
|
|
2017-06-06 04:57:17 +08:00
|
|
|
.type glob0, @object
|
|
|
|
.data
|
|
|
|
.globl glob0
|
|
|
|
glob0:
|
|
|
|
.long 1
|
|
|
|
.size glob0, 4
|
2016-01-07 11:59:08 +08:00
|
|
|
|
2017-06-06 04:57:17 +08:00
|
|
|
.type glob1, @object
|
|
|
|
.section .rodata, #alloc
|
|
|
|
.globl glob1
|
|
|
|
glob1:
|
|
|
|
.long 2
|
|
|
|
.size glob1, 4
|
2017-05-27 01:23:25 +08:00
|
|
|
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: Section {
|
2017-06-06 04:57:17 +08:00
|
|
|
# CHECK: Name: .rodata
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x2)
|
|
|
|
# CHECK: SHF_ALLOC (0x2)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: Address: [[RODATA_ADDR:[0-9xa-f]+]]
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: }
|
|
|
|
|
|
|
|
# CHECK: Section {
|
2017-06-06 04:57:17 +08:00
|
|
|
# CHECK: Name: .data
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x3)
|
|
|
|
# CHECK: SHF_ALLOC (0x2)
|
|
|
|
# CHECK: SHF_WRITE (0x1)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: Address: [[DATA_ADDR:[0-9xa-f]+]]
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: }
|
|
|
|
|
2020-03-04 11:49:14 +08:00
|
|
|
# CHECK: ProgramHeader {
|
|
|
|
# CHECK: Type: PT_LOAD
|
|
|
|
# CHECK: ProgramHeader {
|
|
|
|
# CHECK: Type: PT_LOAD
|
|
|
|
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: Symbol {
|
2017-06-06 04:57:17 +08:00
|
|
|
# CHECK: Name: glob0
|
|
|
|
# CHECK: Value: [[DATA_ADDR]]
|
|
|
|
# CHECK: Size: 4
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .data
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: }
|
|
|
|
|
|
|
|
# CHECK: Symbol {
|
2017-06-06 04:57:17 +08:00
|
|
|
# CHECK: Name: glob1
|
|
|
|
# CHECK: Value: [[RODATA_ADDR]]
|
|
|
|
# CHECK: Size: 4
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .rodata
|
2016-01-07 11:59:08 +08:00
|
|
|
# CHECK: }
|