diff options
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 1 | ||||
| -rw-r--r-- | lld/ELF/OutputSections.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index c291ff13f36..96505b244f8 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -44,7 +44,6 @@ template <class ELFT> OutputSectionBase<ELFT>::OutputSectionBase(StringRef Name, uint32_t Type, uintX_t Flags) : Name(Name) { - memset(&Header, 0, sizeof(Elf_Shdr)); Header.sh_type = Type; Header.sh_flags = Flags; } diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index e83554305bf..54685a864be 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -97,7 +97,7 @@ public: protected: StringRef Name; - Elf_Shdr Header; + Elf_Shdr Header = {}; }; template <class ELFT> class GotSection final : public OutputSectionBase<ELFT> { |

