[ELF] Improve error reporting for relocations
authorPetr Hosek <phosek@chromium.org>
Thu, 18 Aug 2016 21:55:23 +0000 (21:55 +0000)
committerPetr Hosek <phosek@chromium.org>
Thu, 18 Aug 2016 21:55:23 +0000 (21:55 +0000)
commit4071b1bac37e806848a2e0c52c9747fc843491f5
tree1d1ca2ffd2d28bfdd1a42ac7ec6674b4deb78852
parente77a0a9a3b1508c1eaddc1a5833596cbaabb6fd0
[ELF] Improve error reporting for relocations

We should always include symbol name when reporting relocations
error to simplify debugging of these issues. Without symbol names
users have to manually investigate which of the libraries contain
invalid relocations which can be cumbersome when linking multiple
libraries.

Differential Revision: https://reviews.llvm.org/D23690

llvm-svn: 279162
14 files changed:
lld/ELF/Relocations.cpp
lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
lld/test/ELF/arm-target1.s
lld/test/ELF/copy-errors.s
lld/test/ELF/copy-in-shared.s
lld/test/ELF/copy-rel-corrupted.s
lld/test/ELF/copy-rel-pie-error.s
lld/test/ELF/dynamic-reloc-in-ro.s
lld/test/ELF/eh-frame-dyn-rel.s