[ELF] - Better diagnostic for relative relocation to an absolute value error.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 15 Nov 2016 08:07:14 +0000 (08:07 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 15 Nov 2016 08:07:14 +0000 (08:07 +0000)
commit463984d4bfd1ad0207daaca51ca81fdedac25b20
treef3c6b4d2d7c162ba2d0d4e4e4b4e32abe723d107
parent308752e474fa98842a74dc16e171c595b40db651
[ELF] - Better diagnostic for relative relocation to an absolute value error.

Patch adds a filename to that error message.

I faced next error when debugged one of FreeBSD port:
error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr

error message was poor and this patch improves it to show the locations
of symbol declaration and using.

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

llvm-svn: 286940
lld/ELF/InputFiles.cpp
lld/ELF/LinkerScript.cpp
lld/ELF/Relocations.cpp
lld/ELF/SymbolTable.cpp
lld/ELF/SymbolTable.h
lld/ELF/Symbols.h
lld/ELF/Writer.cpp
lld/test/ELF/Inputs/relocation-relative-absolute.s [new file with mode: 0644]
lld/test/ELF/relocation-relative-absolute.s