1## If "Symbol" is not specified for a relocation, the symbol index is assumed to be 0. 2 3# RUN: yaml2obj %s -o %t 4# RUN: llvm-readobj -r %t | FileCheck %s 5 6# CHECK: Relocations [ 7# CHECK-NEXT: Section (2) .rel.text { 8# CHECK-NEXT: 0x1000 R_X86_64_RELATIVE - 0x0 9# CHECK-NEXT: 0x1001 R_X86_64_PC32 - 0x0 10# CHECK-NEXT: } 11# CHECK-NEXT:] 12 13!ELF 14FileHeader: 15 Class: ELFCLASS64 16 Data: ELFDATA2LSB 17 Type: ET_EXEC 18 Machine: EM_X86_64 19Sections: 20 - Name: .text 21 Type: SHT_PROGBITS 22 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 23 Content: "00000000" 24 - Name: .rel.text 25 Type: SHT_REL 26 Info: .text 27 Relocations: 28 - Offset: 0x1000 29 Type: R_X86_64_RELATIVE 30 ## R_X86_64_PC32 should have a non-zero symbol index but we don't error. 31 - Offset: 0x1001 32 Type: R_X86_64_PC32 33