Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 40a1392abdce61c38a915c8e80359ca2813021f5)
+++ src/InitTweak/FixGlobalInit.cc	(revision f1791a44d781391f73246886d5da188e94e3110a)
@@ -112,20 +112,5 @@
 			} // if
 			if ( Statement * ctor = ctorInit->ctor ) {
-				// Translation 1: Add this attribute on the global declaration:
-				//    __attribute__((section (".data#")))
-				// which makes gcc put the global in the data section,
-				// so that the global is writeable (via a const cast) in the init function.
-				// The trailing # is an injected assembly comment, to suppress the "a" in
-				//    .section .data,"a"
-				//    .section .data#,"a"
-				// to avoid assembler warning "ignoring changed section attributes for .data"
-				Type *strLitT = new PointerType( Type::Qualifiers( ),
-					new BasicType( Type::Qualifiers( ), BasicType::Char ) );
-				std::list< Expression * > attr_params;
-				attr_params.push_back( 
-					new ConstantExpr( Constant( strLitT, "\".data#\"", std::nullopt ) ) );
-				objDecl->attributes.push_back(new Attribute("section", attr_params));
-				// Translation 2: Move the initizliation off the global declaration,
-				// into the startup function.
+				addDataSectonAttribute( objDecl );
 				initStatements.push_back( ctor );
 				objDecl->init = nullptr;
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 40a1392abdce61c38a915c8e80359ca2813021f5)
+++ src/InitTweak/FixInit.cc	(revision f1791a44d781391f73246886d5da188e94e3110a)
@@ -802,4 +802,10 @@
 				if ( Statement * ctor = ctorInit->get_ctor() ) {
 					if ( objDecl->get_storageClasses().is_static ) {
+
+						// The ojbect needs to go in the data section, regardless of dtor complexity below.
+						// The attribute works, and is meant to apply, both for leaving the static local alone,
+						// and for hoisting it out as a static global.
+						addDataSectonAttribute( objDecl );
+
 						// originally wanted to take advantage of gcc nested functions, but
 						// we get memory errors with this approach. To remedy this, the static
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision 40a1392abdce61c38a915c8e80359ca2813021f5)
+++ src/InitTweak/InitTweak.cc	(revision f1791a44d781391f73246886d5da188e94e3110a)
@@ -1055,3 +1055,13 @@
 		return isCopyFunction( decl, "?{}" );
 	}
+
+	void addDataSectonAttribute( ObjectDecl * objDecl ) {
+		Type *strLitT = new PointerType( Type::Qualifiers( ),
+			new BasicType( Type::Qualifiers( ), BasicType::Char ) );
+		std::list< Expression * > attr_params;
+		attr_params.push_back( 
+			new ConstantExpr( Constant( strLitT, "\".data#\"", std::nullopt ) ) );
+		objDecl->attributes.push_back(new Attribute("section", attr_params));
+	}
+
 }
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision 40a1392abdce61c38a915c8e80359ca2813021f5)
+++ src/InitTweak/InitTweak.h	(revision f1791a44d781391f73246886d5da188e94e3110a)
@@ -103,4 +103,15 @@
 	bool isConstExpr( Initializer * init );
 
+	/// Modifies objDecl to have:
+	///    __attribute__((section (".data#")))
+	/// which makes gcc put the declared variable in the data section,
+	/// which is helpful for global constants on newer gcc versions,
+	/// so that CFA's generated initialization won't segfault when writing it via a const cast.
+	/// The trailing # is an injected assembly comment, to suppress the "a" in
+	///    .section .data,"a"
+	///    .section .data#,"a"
+	/// to avoid assembler warning "ignoring changed section attributes for .data"
+	void addDataSectonAttribute( ObjectDecl * objDecl );
+
 	class InitExpander_old {
 	public:
