diff options
| author | George Rimar <grimar@accesssoftek.com> | 2016-11-15 08:07:14 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2016-11-15 08:07:14 +0000 |
| commit | 463984d4bfd1ad0207daaca51ca81fdedac25b20 (patch) | |
| tree | f3c6b4d2d7c162ba2d0d4e4e4b4e32abe723d107 /lld/ELF/InputFiles.cpp | |
| parent | 308752e474fa98842a74dc16e171c595b40db651 (diff) | |
| download | bcm5719-llvm-463984d4bfd1ad0207daaca51ca81fdedac25b20.tar.gz bcm5719-llvm-463984d4bfd1ad0207daaca51ca81fdedac25b20.zip | |
[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
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index e5ec606b0b1..406fedabbf9 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -477,7 +477,7 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) { /*CanOmitFromDynSym*/ false, this) ->body(); - return elf::Symtab<ELFT>::X->addRegular(Name, *Sym, Sec)->body(); + return elf::Symtab<ELFT>::X->addRegular(Name, *Sym, Sec, this)->body(); } } @@ -805,11 +805,13 @@ template <class ELFT> void BinaryFile::parse() { Sections.push_back(Section); elf::Symtab<ELFT>::X->addRegular(StartName, STV_DEFAULT, STT_OBJECT, 0, 0, - STB_GLOBAL, Section); + STB_GLOBAL, Section, nullptr); elf::Symtab<ELFT>::X->addRegular(EndName, STV_DEFAULT, STT_OBJECT, - Data.size(), 0, STB_GLOBAL, Section); + Data.size(), 0, STB_GLOBAL, Section, + nullptr); elf::Symtab<ELFT>::X->addRegular(SizeName, STV_DEFAULT, STT_OBJECT, - Data.size(), 0, STB_GLOBAL, nullptr); + Data.size(), 0, STB_GLOBAL, nullptr, + nullptr); } static bool isBitcode(MemoryBufferRef MB) { |

