Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision e89f4b16a58e198551a14858078a1c0c55172fbc)
+++ src/InitTweak/FixGlobalInit.cc	(revision 1be845ba920bd9b049f4c3616eef9ec943dea16d)
@@ -37,5 +37,5 @@
 	class GlobalFixer : public WithShortCircuiting {
 	  public:
-		GlobalFixer( const std::string & name, bool inLibrary );
+		GlobalFixer( bool inLibrary );
 
 		void previsit( ObjectDecl *objDecl );
@@ -52,6 +52,6 @@
 	};
 
-	void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary ) {
-		PassVisitor<GlobalFixer> visitor( name, inLibrary );
+	void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary ) {
+		PassVisitor<GlobalFixer> visitor( inLibrary );
 		acceptAll( translationUnit, visitor );
 		GlobalFixer & fixer = visitor.pass;
@@ -70,15 +70,5 @@
 	}
 
-  std::string globalFunctionName( const std::string & name ) {
-  	// get basename
-  	std::string ret = name.substr( 0, name.find( '.' ) );
-  	// replace invalid characters with _
-		static std::string invalid = "/-@";
-  	replace_if( ret.begin(), ret.end(), []( char c ) { return invalid.find(c) != std::string::npos; }, '_' );
-  	return ret;
-  }
-
-	GlobalFixer::GlobalFixer( const std::string & name, bool inLibrary ) : tempNamer( "_global_init" ) {
-		std::string fixedName = globalFunctionName( name );
+	GlobalFixer::GlobalFixer( bool inLibrary ) : tempNamer( "_global_init" ) {
 		std::list< Expression * > ctorParameters;
 		std::list< Expression * > dtorParameters;
@@ -90,10 +80,12 @@
 			// for library code are run before constructors and destructors for user code,
 			// specify a priority when building the library. Priorities 0-100 are reserved by gcc.
-			ctorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
-			dtorParameters.push_back( new ConstantExpr( Constant::from_int( 102 ) ) );
+			// Priorities 101-200 are reserved by cfa, so use priority 200 for CFA library globals,
+			// allowing room for overriding with a higher priority.
+			ctorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
+			dtorParameters.push_back( new ConstantExpr( Constant::from_int( 200 ) ) );
 		}
-		initFunction = new FunctionDecl( "_init_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
+		initFunction = new FunctionDecl( "__global_init__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
 		initFunction->get_attributes().push_back( new Attribute( "constructor", ctorParameters ) );
-		destroyFunction = new FunctionDecl( "_destroy_" + fixedName, Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
+		destroyFunction = new FunctionDecl( "__global_destroy__", Type::StorageClasses( Type::Static ), LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt() );
 		destroyFunction->get_attributes().push_back( new Attribute( "destructor", dtorParameters ) );
 	}
Index: src/InitTweak/FixGlobalInit.h
===================================================================
--- src/InitTweak/FixGlobalInit.h	(revision e89f4b16a58e198551a14858078a1c0c55172fbc)
+++ src/InitTweak/FixGlobalInit.h	(revision 1be845ba920bd9b049f4c3616eef9ec943dea16d)
@@ -22,12 +22,8 @@
 
 namespace InitTweak {
-  /// Moves global initialization into an _init function that is unique to the translation unit.
-  /// Sets the priority of the initialization function depending on whether the initialization
-  /// function is for library code.
-  void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
-
-  /// Apply transformations to a file name to get a valid C identifier which will be used as
-  /// the name of the generated initializer function.
-  std::string globalFunctionName( const std::string & name );
+	/// Moves global initialization into an _init function that is unique to the translation unit.
+	/// Sets the priority of the initialization function depending on whether the initialization
+	/// function is for library code.
+	void fixGlobalInit( std::list< Declaration * > & translationUnit, bool inLibrary );
 } // namespace
 
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision e89f4b16a58e198551a14858078a1c0c55172fbc)
+++ src/InitTweak/FixInit.cc	(revision 1be845ba920bd9b049f4c3616eef9ec943dea16d)
@@ -238,10 +238,10 @@
 	} // namespace
 
-	void fix( std::list< Declaration * > & translationUnit, const std::string & filename, bool inLibrary ) {
+	void fix( std::list< Declaration * > & translationUnit, bool inLibrary ) {
 		PassVisitor<SelfAssignChecker> checker;
 		acceptAll( translationUnit, checker );
 
 		// fixes ConstructorInit for global variables. should happen before fixInitializers.
-		InitTweak::fixGlobalInit( translationUnit, filename, inLibrary );
+		InitTweak::fixGlobalInit( translationUnit, inLibrary );
 
 		UnqCount unqCount;
Index: src/InitTweak/FixInit.h
===================================================================
--- src/InitTweak/FixInit.h	(revision e89f4b16a58e198551a14858078a1c0c55172fbc)
+++ src/InitTweak/FixInit.h	(revision 1be845ba920bd9b049f4c3616eef9ec943dea16d)
@@ -24,5 +24,5 @@
   /// replace constructor initializers with expression statements
   /// and unwrap basic C-style initializers
-	void fix( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary );
+	void fix( std::list< Declaration * > & translationUnit, bool inLibrary );
 } // namespace
 
