Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 69c5c001921edf7a77ff0c53ac4f0d0e8044b405)
+++ src/InitTweak/FixGlobalInit.cc	(revision 6fbe9a5fd01aa79d7b7dd2fbf7e7b4656c1b7bc7)
@@ -112,4 +112,20 @@
 			} // 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.
 				initStatements.push_back( ctor );
 				objDecl->init = nullptr;
