diff options
| -rw-r--r-- | lld/ELF/Writer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 04d92149c38..6df39f68198 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -356,11 +356,9 @@ void Writer<ELFT>::scanRelocs( } template <class ELFT> void Writer<ELFT>::scanRelocs(InputSection<ELFT> &C) { - if (!(C.getSectionHdr()->sh_flags & SHF_ALLOC)) - return; - - for (const Elf_Shdr *RelSec : C.RelocSections) - scanRelocs(C, *RelSec); + if (C.getSectionHdr()->sh_flags & SHF_ALLOC) + for (const Elf_Shdr *RelSec : C.RelocSections) + scanRelocs(C, *RelSec); } template <class ELFT> |

