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
This commit is contained in:
Peter Collingbourne 2019-02-21 18:53:58 +00:00
parent 5f47fac3a2
commit f9232b0c00
1 changed files with 2 additions and 3 deletions

View File

@ -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;