diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 621405baee4..10d08c6c50d 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -395,8 +395,9 @@ template <class ELFT> unsigned RelocationSection<ELFT>::getRelocOffset() { } template <class ELFT> void RelocationSection<ELFT>::finalize() { - this->Header.sh_link = Static ? Out<ELFT>::SymTab->SectionIndex - : Out<ELFT>::DynSymTab->SectionIndex; + this->Header.sh_link = isOutputDynamic<ELFT>() + ? Out<ELFT>::DynSymTab->SectionIndex + : Out<ELFT>::SymTab->SectionIndex; this->Header.sh_size = Relocs.size() * this->Header.sh_entsize; } |