xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/elf-broken-reloc-target.yaml (revision e0fd87cc64d5102f20219b6bad0e337dc4e6b2d2)
1## Check we report an error if the relocated section identified by the
2## sh_info field of a relocation section is invalid.
3
4# RUN: yaml2obj %s -o %t
5# RUN: not llvm-dwarfdump %t 2>&1 | FileCheck %s -DFILE=%t --check-prefix=ERR
6
7# ERR: error: failed to get relocated section: invalid section index: 255
8
9--- !ELF
10FileHeader:
11  Class:   ELFCLASS64
12  Data:    ELFDATA2LSB
13  Type:    ET_REL
14  Machine: EM_X86_64
15Sections:
16- Name: .rela.debug_info
17  Type: SHT_RELA
18  Link: 0
19  Info: 0xFF
20  Relocations: []
21