diff options
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 98894bf44d0..c2817df5dac 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1514,9 +1514,8 @@ void RelocationBaseSection::finalizeContents() { // When linking glibc statically, .rel{,a}.plt contains R_*_IRELATIVE // relocations due to IFUNC (e.g. strcpy). sh_link will be set to 0 in that // case. - InputSection *SymTab = Config->Relocatable ? In.SymTab : In.DynSymTab; - if (SymTab && SymTab->getParent()) - getParent()->Link = SymTab->getParent()->SectionIndex; + if (In.DynSymTab && In.DynSymTab->getParent()) + getParent()->Link = In.DynSymTab->getParent()->SectionIndex; else getParent()->Link = 0; |