[ELF] - Fail the link if something happens on DWARF parsing stage of -gdb-index building
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 7 Jul 2017 09:18:05 +0000 (09:18 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 7 Jul 2017 09:18:05 +0000 (09:18 +0000)
commit1b51b7fc7f99f1d291284d83aaa8bcc4ce5fd62c
treef226ad31f64b2838914af0da9aa7506c4946cc44
parent9872a6aaad4decc324589aa26cf63abe107c50b3
[ELF] - Fail the link if something happens on DWARF parsing stage of -gdb-index building

This is relative to PR33173,

Previously if something wrong happened on DWARF parsers side during parsing
object for building gdb index (like was in PR: unsupported relocation)
then LLD continued and finished the link. DWARF parsers sure showed error
message on their side, but that is all.

Patch changes behavior to fail the link in this case and show more
detailed message.

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

llvm-svn: 307370
lld/ELF/SyntheticSections.cpp
lld/test/ELF/invalid/invalid-debug-relocations.test [new file with mode: 0644]