forked from OSchip/llvm-project
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:
parent
5f47fac3a2
commit
f9232b0c00
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue