[ELF] Only print symbol name when it is available
authorPetr Hosek <phosek@chromium.org>
Mon, 22 Aug 2016 19:01:53 +0000 (19:01 +0000)
committerPetr Hosek <phosek@chromium.org>
Mon, 22 Aug 2016 19:01:53 +0000 (19:01 +0000)
commit5b4f6c6b2870c2bd866d117a4e1fe1e45752cd9b
treeadd54b2336aacdb96530b7315ca1b744fc64dca6
parentc9e8bc191c69962f2acaace79800196ef5200eec
[ELF] Only print symbol name when it is available

Not only symbols (like sections) have names, in case where we
fail to create relocation against such symbol, we should not
print out an empty string, instead we should print a generic
message.

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

llvm-svn: 279459
lld/ELF/Relocations.cpp
lld/test/ELF/dynamic-reloc-in-ro.s