1# RUN: yaml2obj %s > %t 2# RUN: llvm-readobj -r %t | FileCheck %s 3 4# CHECK: Relocations [ 5# CHECK: Section (2) .rela.text { 6# CHECK: 0x0 R_AMDGPU_NONE main 0x0 7# CHECK: 0x8 R_AMDGPU_ABS32_LO - 0x0 8# CHECK: 0x10 R_AMDGPU_ABS32_HI - 0x0 9# CHECK: 0x18 R_AMDGPU_ABS64 - 0x0 10# CHECK: 0x20 R_AMDGPU_REL32 - 0x0 11# CHECK: 0x28 R_AMDGPU_REL64 - 0x0 12# CHECK: 0x30 R_AMDGPU_ABS32 - 0x0 13# CHECK: } 14# CHECK: ] 15 16!ELF 17FileHeader: 18 Class: ELFCLASS64 19 Data: ELFDATA2LSB 20 Type: ET_REL 21 Machine: EM_AMDGPU 22Sections: 23 - Type: SHT_PROGBITS 24 Name: .text 25 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 26 AddressAlign: 0x08 27 Content: 0000000000000000 28 - Type: SHT_RELA 29 Name: .rela.text 30 Link: .symtab 31 Info: .text 32 AddressAlign: 0x08 33 Relocations: 34 - Offset: 0x0 35 Symbol: main 36 Type: R_AMDGPU_NONE 37 - Offset: 0x8 38 Symbol: a 39 Type: R_AMDGPU_ABS32_LO 40 - Offset: 0x10 41 Symbol: b 42 Type: R_AMDGPU_ABS32_HI 43 - Offset: 0x18 44 Symbol: c 45 Type: R_AMDGPU_ABS64 46 - Offset: 0x20 47 Symbol: d 48 Type: R_AMDGPU_REL32 49 - Offset: 0x28 50 Symbol: e 51 Type: R_AMDGPU_REL64 52 - Offset: 0x30 53 Symbol: f 54 Type: R_AMDGPU_ABS32 55 56Symbols: 57 Local: 58 - Name: .text 59 Type: STT_SECTION 60 Section: .text 61 62 Global: 63 - Name: main 64 Type: STT_FUNC 65 Section: .text 66 Size: 0x08 67