diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-21 18:53:58 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-21 18:53:58 +0000 |
| commit | f9232b0c008c5606dcbc73c8223a448cfefd2d21 (patch) | |
| tree | 11e1dec6dee0cff881981885d26315d3a020cd71 | |
| parent | 5f47fac3a2b026834e1bde04e60e8f82f4314b6e (diff) | |
| download | bcm5719-llvm-f9232b0c008c5606dcbc73c8223a448cfefd2d21.tar.gz bcm5719-llvm-f9232b0c008c5606dcbc73c8223a448cfefd2d21.zip | |
ELF: Remove dead code. NFCI.
RelocationBaseSection is not used in -r links, so Config->Relocatable will
always be false.
Differential Revision: https://reviews.llvm.org/D58489
llvm-svn: 354607
| -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; |

