1# REQUIRES: x86 2# RUN: yaml2obj %s -o %t.o 3# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s 4 5## Previously we would report an error saying the relocation in .debug_info 6## has an unsupported target. 7## Check we do not report debug information parsing errors when relocation 8## used is of type R_*_NONE, what actually means it should be ignored. 9 10# CHECK-NOT: error 11# CHECK: error: undefined symbol: bar 12# CHECK-NOT: error 13 14--- !ELF 15FileHeader: 16 Class: ELFCLASS64 17 Data: ELFDATA2LSB 18 Type: ET_REL 19 Machine: EM_X86_64 20Sections: 21 - Name: .text 22 Type: SHT_PROGBITS 23 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 24 Content: '0000000000000000' 25 - Name: .rela.text 26 Type: SHT_RELA 27 AddressAlign: 8 28 Link: .symtab 29 Info: .text 30 Relocations: 31 - Offset: 0x0000000000000000 32 Symbol: bar 33 Type: R_X86_64_64 34 - Name: .debug_line 35 Type: SHT_PROGBITS 36 Content: 3300000002001C0000000101FB0E0D000101010100000001000001006162632E7300000000000009020000000000000000140208000101 37 - Name: .rela.debug_line 38 AddressAlign: 8 39 Type: SHT_RELA 40 Link: .symtab 41 Info: .debug_line 42 Relocations: 43 - Offset: 0x0000000000000029 44 Type: R_X86_64_NONE 45 - Name: .debug_info 46 Type: SHT_PROGBITS 47 AddressAlign: 0x0000000000000001 48 Content: 0C000000040000000000080100000000 49 - Name: .debug_abbrev 50 Type: SHT_PROGBITS 51 AddressAlign: 0x0000000000000001 52 Content: '0111001017000000' 53 54Symbols: 55 Global: 56 - Name: _start 57 Section: .text 58 - Name: bar 59