[PATCH] D53993: [ELF] Set sh_link to 0 in static link to make GNU strip happy
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 14:25:41 PDT 2018
pcc added a comment.
> https://reviews.llvm.org/D52830 sets sh_link to .symtab in static link, which makes more sense than 0,
I don't know about that. Irrespective of the bug it seems a little odd for a SHF_ALLOC section to be linked to a non-SHF_ALLOC section. Should this be instead:
if (InputSection *SymTab = Config->Relocatable ? In.SymTab : In.DynSymTab)
getParent()->Link = SymTab->getParent()->SectionIndex;
else
getParent()->Link = 0;
?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D53993
More information about the llvm-commits
mailing list