[ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk...
authorFangrui Song <i@maskray.me>
Fri, 11 Sep 2020 16:31:37 +0000 (09:31 -0700)
committerFangrui Song <i@maskray.me>
Mon, 14 Sep 2020 16:55:59 +0000 (09:55 -0700)
commit94921e9f8ad04793638e02a6104f63e06ae62b9e
tree1f06f7a0e1fa543447b68a2d79a388fda4a9b82f
parentc92d1aa44b132597d57523a90342b3e620dbdb1e
[ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors

Prefer `errorOrWarn` to `fatal` for recoverable errors and graceful degradation
when --noinhibit-exec is specified.

Mention the destination symbol, otherwise the diagnostic is not really actionable.
Two errors are not tested but the patch does not intend to add the coverage.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D87486
lld/ELF/Relocations.cpp
lld/ELF/Target.h
lld/ELF/Thunks.cpp
lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s