1# REQUIRES: amdgpu 2# RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri --amdhsa-code-object-version=2 %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.hsa_code_object_version 1,0 7.hsa_code_object_isa 7,0,0,"AMD","AMDGPU" 8 9.text 10.globl kernel0 11.align 256 12.amdgpu_hsa_kernel kernel0 13kernel0: 14 s_endpgm 15.Lfunc_end0: 16 .size kernel0, .Lfunc_end0-kernel0 17 18.globl kernel1 19.align 256 20.amdgpu_hsa_kernel kernel1 21kernel1: 22 s_endpgm 23 s_endpgm 24.Lfunc_end1: 25 .size kernel1, .Lfunc_end1-kernel1 26 27 28# CHECK: Section { 29# CHECK: Name: .text 30# CHECK: Type: SHT_PROGBITS 31# CHECK: Flags [ (0x6) 32# CHECK: SHF_ALLOC (0x2) 33# CHECK: SHF_EXECINSTR (0x4) 34# CHECK: ] 35# CHECK: } 36 37# CHECK: ProgramHeader { 38# CHECK: Type: PT_LOAD 39 40# CHECK: Symbol { 41# CHECK: Name: kernel0 42# CHECK: Value: 43# CHECK: Size: 4 44# CHECK: Binding: Global 45# CHECK: Type: AMDGPU_HSA_KERNEL 46# CHECK: Section: .text 47# CHECK: } 48 49# CHECK: Symbol { 50# CHECK: Name: kernel1 51# CHECK: Value: 52# CHECK: Size: 8 53# CHECK: Binding: Global 54# CHECK: Type: AMDGPU_HSA_KERNEL 55# CHECK: Section: .text 56# CHECK: } 57