1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/tools/llvm-dwarfdump/elf-broken-reloc-target.yaml
George Rimar 9459104c4d [llvm/Object] - Make ELFObjectFile::getRelocatedSection return Expected<section_iterator>
It returns just a section_iterator currently and have a report_fatal_error call inside.
This change adds a way to return errors and handle them on caller sides.

The patch also changes/improves current users and adds test cases.

Differential revision: https://reviews.llvm.org/D69167

llvm-svn: 375408
2019-10-21 11:06:38 +00:00

21 lines
498 B
YAML

## Check we report an error if the relocated section identified by the
## sh_info field of a relocation section is invalid.
# RUN: yaml2obj %s -o %t
# RUN: llvm-dwarfdump %t 2>&1 | FileCheck %s -DFILE=%t --check-prefix=ERR
# ERR: error: failed to get relocated section: invalid section index: 255
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .rela.debug_info
Type: SHT_RELA
Link: 0
Info: 0xFF
Relocations: []