Index: include/llvm/MC/MCAsmInfoELF.h =================================================================== --- include/llvm/MC/MCAsmInfoELF.h +++ include/llvm/MC/MCAsmInfoELF.h @@ -15,7 +15,7 @@ namespace llvm { class MCAsmInfoELF : public MCAsmInfo { virtual void anchor(); - MCSection *getNonexecutableStackSection(MCContext &Ctx) const final; + MCSection *getNonexecutableStackSection(MCContext &Ctx) const; protected: MCAsmInfoELF(); Index: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h =================================================================== --- lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h +++ lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h @@ -25,6 +25,8 @@ public: explicit WebAssemblyMCAsmInfo(const Triple &T); ~WebAssemblyMCAsmInfo() override; + + MCSection *getNonexecutableStackSection(MCContext &Ctx) const override; }; } // end namespace llvm Index: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp =================================================================== --- lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp +++ lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp @@ -45,3 +45,10 @@ // TODO: UseIntegratedAssembler? } + +MCSection * +WebAssemblyMCAsmInfo::getNonexecutableStackSection(MCContext &Ctx) const { + // In WebAssembly the stack is never executable, so it isn't necessary to + // declare this in the object file. + return nullptr; +}