[ELF] - Do not fail on R_*_NONE relocations when parsing the debug info.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 26 Sep 2018 08:11:34 +0000 (08:11 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 26 Sep 2018 08:11:34 +0000 (08:11 +0000)
commit95aae4c59d22d5e5583d4dc7a2c92b3ed37591ca
tree54677399f94897879e2360f0a8fd1316fe9338d9
parent42a0bd189bd805741cc23e8df909677abde3a0a7
[ELF] - Do not fail on R_*_NONE relocations when parsing the debug info.

This is https://bugs.llvm.org//show_bug.cgi?id=38919.

Currently, LLD may report "unsupported relocation target while parsing debug info"
when parsing the debug information.

At the same time LLD does that for zeroed R_X86_64_NONE relocations,
which obviously has "invalid" targets.

The nature of R_*_NONE relocation assumes them should be ignored.
This patch teaches LLD to stop reporting the debug information parsing errors for them.

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

llvm-svn: 343078
16 files changed:
lld/ELF/Arch/AArch64.cpp
lld/ELF/Arch/AMDGPU.cpp
lld/ELF/Arch/ARM.cpp
lld/ELF/Arch/AVR.cpp
lld/ELF/Arch/Hexagon.cpp
lld/ELF/Arch/Mips.cpp
lld/ELF/Arch/PPC.cpp
lld/ELF/Arch/PPC64.cpp
lld/ELF/Arch/RISCV.cpp
lld/ELF/Arch/SPARCV9.cpp
lld/ELF/Arch/X86.cpp
lld/ELF/Arch/X86_64.cpp
lld/ELF/DWARF.cpp
lld/ELF/Target.h
lld/test/ELF/debug-relocation-none.test [new file with mode: 0644]
lld/test/ELF/undef-broken-debug.test