1# REQUIRES: x86
2# RUN: yaml2obj %s -o %t.o
3# RUN: not ld.lld -gdb-index %t.o -o /dev/null 2>&1 | FileCheck %s
4
5# CHECK: error: {{.*}}invalid-debug-relocations.test.tmp.o:(.debug_info+0x0): unknown relocation (255) against symbol _start
6
7!ELF
8FileHeader:
9  Class:           ELFCLASS32
10  Data:            ELFDATA2LSB
11  Type:            ET_REL
12  Machine:         EM_386
13Sections:
14  - Type:            SHT_PROGBITS
15    Name:            .text
16    Flags:           [ ]
17    AddressAlign:    0x04
18    Content:         "0000"
19  - Type:            SHT_PROGBITS
20    Name:            .debug_info
21    Flags:           [ ]
22    AddressAlign:    0x04
23    Content:         "0000"
24  - Type:            SHT_REL
25    Name:            .rel.debug_info
26    Link:            .symtab
27    Info:            .debug_info
28    Relocations:
29      - Offset:          0
30        Symbol:          _start
31        Type:            0xFF
32      - Offset:          4
33        Symbol:          _start
34        Type:            0xFF
35Symbols:
36  - Name:     _start
37    Type:     STT_FUNC
38    Section:  .text
39    Value:    0x0
40    Binding:  STB_GLOBAL
41