diff options
author | Ed Maste <emaste@FreeBSD.org> | 2018-10-11 13:19:17 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2018-10-11 13:19:17 +0000 |
commit | b371a9f082825a014a90453af9793eed88522e06 (patch) | |
tree | 50cc1da95c08d93859627a032e7d4f5c4a17c033 /contrib | |
parent | 43f8d28c373bc8b78b4ad83366cabdb08a4f04ae (diff) | |
download | src-test2-b371a9f082825a014a90453af9793eed88522e06.tar.gz src-test2-b371a9f082825a014a90453af9793eed88522e06.zip |
Notes
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/llvm/tools/lld/ELF/SyntheticSections.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp b/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp index bc787bc59070..14f459816de7 100644 --- a/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp +++ b/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp @@ -1213,11 +1213,13 @@ void RelocationBaseSection::addReloc(const DynamicReloc &Reloc) { void RelocationBaseSection::finalizeContents() { // If all relocations are R_*_RELATIVE they don't refer to any // dynamic symbol and we don't need a dynamic symbol table. If that - // is the case, just use 0 as the link. - Link = InX::DynSymTab ? InX::DynSymTab->getParent()->SectionIndex : 0; + // is the case, just use the index of the regular symbol table section. + getParent()->Link = InX::DynSymTab ? + InX::DynSymTab->getParent()->SectionIndex : + InX::SymTab->getParent()->SectionIndex; - // Set required output section properties. - getParent()->Link = Link; + if (InX::RelaIplt == this || InX::RelaPlt == this) + getParent()->Info = InX::GotPlt->getParent()->SectionIndex; } template <class ELFT> |