mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
4f1d6dd171
Makes it easier to test "this doesn't produce an error" (& indeed makes that the implied default so we don't accidentally write tests that have silent/sneaky errors as well as the positive behavior we're testing for) Though the support for applying relocations is patchy enough that a bunch of tests treat lack of relocation application as more of a warning than an error - so rather than me trying to figure out how to add support for a bunch of relocation types, let's degrade that to a warning to match the usage (& indeed, it's sort of more of a tool warning anyway - it's not that the DWARF is wrong, just that the tool can't fully cope with it - and it's not like the tool won't dump the DWARF, it just won't follow/render certain relocations - I guess in the most general case it might try to render an unrelocated value & instead render something bogus... but mostly seems to be about interesting relocations used in eh_frame (& honestly it might be nice if we were lazier about doing this relocation resolution anyway - if you're not dumping eh_frame, should we really be erroring about the relocations in it?))
21 lines
502 B
YAML
21 lines
502 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: not 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: []
|