1# REQUIRES: amdgpu 2# RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri %s -o %t.o 3# RUN: ld.lld -shared %t.o -o %t 4# RUN: llvm-readobj --sections --symbols -l %t | FileCheck %s 5 6.type glob0, @object 7.data 8 .globl glob0 9glob0: 10 .long 1 11 .size glob0, 4 12 13.type glob1, @object 14.section .rodata, #alloc 15 .globl glob1 16glob1: 17 .long 2 18 .size glob1, 4 19 20# CHECK: Section { 21# CHECK: Name: .rodata 22# CHECK: Type: SHT_PROGBITS 23# CHECK: Flags [ (0x2) 24# CHECK: SHF_ALLOC (0x2) 25# CHECK: ] 26# CHECK: Address: [[RODATA_ADDR:[0-9xa-f]+]] 27# CHECK: } 28 29# CHECK: Section { 30# CHECK: Name: .data 31# CHECK: Type: SHT_PROGBITS 32# CHECK: Flags [ (0x3) 33# CHECK: SHF_ALLOC (0x2) 34# CHECK: SHF_WRITE (0x1) 35# CHECK: ] 36# CHECK: Address: [[DATA_ADDR:[0-9xa-f]+]] 37# CHECK: } 38 39# CHECK: ProgramHeader { 40# CHECK: Type: PT_LOAD 41# CHECK: ProgramHeader { 42# CHECK: Type: PT_LOAD 43 44# CHECK: Symbol { 45# CHECK: Name: glob0 46# CHECK: Value: [[DATA_ADDR]] 47# CHECK: Size: 4 48# CHECK: Type: Object 49# CHECK: Section: .data 50# CHECK: } 51 52# CHECK: Symbol { 53# CHECK: Name: glob1 54# CHECK: Value: [[RODATA_ADDR]] 55# CHECK: Size: 4 56# CHECK: Type: Object 57# CHECK: Section: .rodata 58# CHECK: } 59