xref: /llvm-project/lld/test/ELF/invalid/invalid-debug-relocations.test (revision e36223c85cd49858a808a2420144b64cad37839f)
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      - Symbol:          _start
30        Type:            0xFF
31      - Offset:          4
32        Symbol:          _start
33        Type:            0xFF
34Symbols:
35  - Name:     _start
36    Type:     STT_FUNC
37    Section:  .text
38    Value:    0x0
39    Binding:  STB_GLOBAL
40