Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 37b7d951459a8cb66e00d62c29da49e8423128ed)
+++ src/InitTweak/FixGlobalInit.cc	(revision cb25fc9986ee4c5499f5787578c8c32099e0d866)
@@ -153,4 +153,5 @@
 			} // if
 			if ( Statement * ctor = ctorInit->ctor ) {
+				addDataSectonAttribute( objDecl );
 				initStatements.push_back( ctor );
 				objDecl->init = nullptr;
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 37b7d951459a8cb66e00d62c29da49e8423128ed)
+++ src/InitTweak/FixInit.cc	(revision cb25fc9986ee4c5499f5787578c8c32099e0d866)
@@ -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 37b7d951459a8cb66e00d62c29da49e8423128ed)
+++ src/InitTweak/InitTweak.cc	(revision cb25fc9986ee4c5499f5787578c8c32099e0d866)
@@ -1103,3 +1103,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 37b7d951459a8cb66e00d62c29da49e8423128ed)
+++ src/InitTweak/InitTweak.h	(revision cb25fc9986ee4c5499f5787578c8c32099e0d866)
@@ -108,4 +108,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:
