3 # RUN: llvm-mc -filetype=obj -triple=amdgcn-amd-amdhsa --amdhsa-code-object-version=4 %s -o %t.o
4 # RUN: ld.lld %t.o -o %t
5 # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefixes=CHECK,HSA4 %s
6 # RUN: ld.lld -m elf64_amdgpu %t.o -o %t
7 # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefixes=CHECK,HSA4 %s
9 # RUN: llvm-mc -filetype=obj -triple=amdgcn-amd-amdhsa --amdhsa-code-object-version=5 %s -o %t.o
10 # RUN: ld.lld %t.o -o %t
11 # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefixes=CHECK,HSA5 %s
12 # RUN: ld.lld -m elf64_amdgpu %t.o -o %t
13 # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefixes=CHECK,HSA5 %s
17 # CHECK-NEXT: Magic: (7F 45 4C 46)
18 # CHECK-NEXT: Class: 64-bit (0x2)
19 # CHECK-NEXT: DataEncoding: LittleEndian (0x1)
20 # CHECK-NEXT: FileVersion: 1
21 # CHECK-NEXT: OS/ABI: AMDGPU_HSA (0x40)
24 # CHECK: Unused: (00 00 00 00 00 00 00)
26 # CHECK-NEXT: Type: Executable (0x2)
27 # CHECK-NEXT: Machine: EM_AMDGPU (0xE0)
28 # CHECK-NEXT: Version: 1
30 # CHECK-NEXT: ProgramHeaderOffset: 0x40
31 # CHECK-NEXT: SectionHeaderOffset:
32 # CHECK-NEXT: Flags [ (0x0)
34 # CHECK-NEXT: HeaderSize: 64
35 # CHECK-NEXT: ProgramHeaderEntrySize: 56
36 # CHECK-NEXT: ProgramHeaderCount:
37 # CHECK-NEXT: SectionHeaderEntrySize: 64
38 # CHECK-NEXT: SectionHeaderCount:
39 # CHECK-NEXT: StringTableSectionIndex: