diff options
Diffstat (limited to 'contrib/llvm-project/lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | contrib/llvm-project/lld/ELF/LinkerScript.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm-project/lld/ELF/LinkerScript.cpp b/contrib/llvm-project/lld/ELF/LinkerScript.cpp index 6de2cd65b973..7314b27659bb 100644 --- a/contrib/llvm-project/lld/ELF/LinkerScript.cpp +++ b/contrib/llvm-project/lld/ELF/LinkerScript.cpp @@ -679,8 +679,11 @@ addInputSec(StringMap<TinyPtrVector<OutputSection *>> &map, auto *firstIsec = cast<InputSectionBase>( cast<InputSectionDescription>(sec->sectionCommands[0]) ->sectionBases[0]); - if (firstIsec->getLinkOrderDep()->getOutputSection() != - isec->getLinkOrderDep()->getOutputSection()) + OutputSection *firstIsecOut = + firstIsec->flags & SHF_LINK_ORDER + ? firstIsec->getLinkOrderDep()->getOutputSection() + : nullptr; + if (firstIsecOut != isec->getLinkOrderDep()->getOutputSection()) continue; } |
