Index: lib/Basic/Targets/OSTargets.h =================================================================== --- lib/Basic/Targets/OSTargets.h +++ lib/Basic/Targets/OSTargets.h @@ -711,11 +711,6 @@ Builder.defineMacro("_GNU_SOURCE"); } - // As an optimization, group static init code together in a section. - const char *getStaticInitSectionSpecifier() const final { - return ".text.__startup"; - } - public: explicit WebAssemblyOSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) Index: test/CodeGenCXX/static-init-wasm.cpp =================================================================== --- test/CodeGenCXX/static-init-wasm.cpp +++ test/CodeGenCXX/static-init-wasm.cpp @@ -43,12 +43,12 @@ A theA; -// WEBASSEMBLY32: define internal void @__cxx_global_var_init() #3 section ".text.__startup" { +// WEBASSEMBLY32: define internal void @__cxx_global_var_init() #3 { // WEBASSEMBLY32: call %struct.A* @_ZN1AC1Ev(%struct.A* @theA) -// WEBASSEMBLY32: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 section ".text.__startup" { +// WEBASSEMBLY32: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 { // WEBASSEMBLY32: call void @__cxx_global_var_init() // -// WEBASSEMBLY64: define internal void @__cxx_global_var_init() #3 section ".text.__startup" { +// WEBASSEMBLY64: define internal void @__cxx_global_var_init() #3 { // WEBASSEMBLY64: call %struct.A* @_ZN1AC1Ev(%struct.A* @theA) -// WEBASSEMBLY64: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 section ".text.__startup" { +// WEBASSEMBLY64: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 { // WEBASSEMBLY64: call void @__cxx_global_var_init()