Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision 37024fd8a316113ef12f469617e9da9c6cecc309)
+++ src/InitTweak/FixGlobalInit.cc	(revision fac84bec61bfcae250ff4c206545b9a9c1261619)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 04 15:14:56 2016
 // Last Modified By : Rob Schluntz
-// Last Modified On : Fri May 06 14:59:26 2016
+// Last Modified On : Fri May 06 15:40:48 2016
 // Update Count     : 2
 //
@@ -30,5 +30,5 @@
 	class GlobalFixer : public Visitor {
 	  public:
-		GlobalFixer( const std::string & name );
+		GlobalFixer( const std::string & name, bool inLibrary );
 
 		virtual void visit( ObjectDecl *objDecl );
@@ -87,6 +87,6 @@
 	}
 
-	void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name ) {
-		GlobalFixer fixer( name );
+	void fixGlobalInit( std::list< Declaration * > & translationUnit, const std::string & name, bool inLibrary ) {
+		GlobalFixer fixer( name, inLibrary );
 		acceptAll( translationUnit, fixer );
 		translationUnit.push_back( fixer.initFunction );
@@ -102,6 +102,6 @@
   }
 
-	GlobalFixer::GlobalFixer( const std::string & name ) : tempNamer( "_global_init" ) {
-		initFunction = new FunctionDecl( initName( name ), DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false, FunctionDecl::Constructor );
+	GlobalFixer::GlobalFixer( const std::string & name, bool inLibrary ) : tempNamer( "_global_init" ) {
+		initFunction = new FunctionDecl( initName( name ), DeclarationNode::Static, LinkageSpec::C, new FunctionType( Type::Qualifiers(), false ), new CompoundStmt( noLabels ), false, false, FunctionDecl::Attribute( FunctionDecl::Attribute::Constructor, inLibrary ? FunctionDecl::Attribute::High : FunctionDecl::Attribute::Default ) );
 	}
 
Index: src/InitTweak/FixGlobalInit.h
===================================================================
--- src/InitTweak/FixGlobalInit.h	(revision 37024fd8a316113ef12f469617e9da9c6cecc309)
+++ src/InitTweak/FixGlobalInit.h	(revision fac84bec61bfcae250ff4c206545b9a9c1261619)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 04 15:14:56 2016
 // Last Modified By : Rob Schluntz
-// Last Modified On : Wed May 04 16:35:37 2016
+// Last Modified On : Fri May 06 15:29:13 2016
 // Update Count     : 2
 //
@@ -24,6 +24,8 @@
 
 namespace InitTweak {
-  /// Moves global initialization into an _init function that is unique to the translation unit
-  void fixGlobalInit( std::list< Declaration * > & translationUnit, 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, const std::string & name, bool inLibrary );
 
   /// Apply transformations to a file name to get a valid C identifier which will be used as
