Index: libcfa/src/concurrency/alarm.cfa
===================================================================
--- libcfa/src/concurrency/alarm.cfa	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ libcfa/src/concurrency/alarm.cfa	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -45,10 +45,10 @@
 //=============================================================================================
 
-void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period ) with( this ) {
+void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period) with( this ) {
 	this.thrd = thrd;
 	this.alarm = alarm;
 	this.period = period;
 	set = false;
-	kernel_alarm = false;
+	type = User;
 }
 
@@ -58,5 +58,13 @@
 	this.period = period;
 	set = false;
-	kernel_alarm = true;
+	type = Kernel;
+}
+void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period, Alarm_Callback callback ) with( this ) {
+	this.thrd = thrd;
+	this.alarm = alarm;
+	this.period = period;
+	this.callback = callback;
+	set = false;
+	type = Callback;
 }
 
Index: libcfa/src/concurrency/alarm.hfa
===================================================================
--- libcfa/src/concurrency/alarm.hfa	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ libcfa/src/concurrency/alarm.hfa	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -39,4 +39,10 @@
 //=============================================================================================
 
+enum alarm_type{ Kernel = 0, User = 1, Callback = 2 };
+
+struct alarm_node_t;
+
+typedef void (*Alarm_Callback)(alarm_node_t & );
+
 struct alarm_node_t {
 	Time alarm;				// time when alarm goes off
@@ -50,6 +56,8 @@
 	};
 
+	Alarm_Callback callback;
+
 	bool set		:1;		// whether or not the alarm has be registered
-	bool kernel_alarm	:1;		// true if this is not a user defined alarm
+	enum alarm_type type;		// true if this is not a user defined alarm
 };
 DLISTED_MGD_IMPL_OUT(alarm_node_t)
@@ -57,4 +65,5 @@
 void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period );
 void ?{}( alarm_node_t & this, processor   * proc, Time alarm, Duration period );
+void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period, Alarm_Callback callback );
 void ^?{}( alarm_node_t & this );
 
Index: libcfa/src/concurrency/locks.cfa
===================================================================
--- libcfa/src/concurrency/locks.cfa	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ libcfa/src/concurrency/locks.cfa	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -15,4 +15,5 @@
 		this.t = t;
 		this.lock = 0p;
+		this.listed = false;
 	}
 
@@ -21,4 +22,5 @@
 		this.info = info;
 		this.lock = 0p;
+		this.listed = false;
 	}
 
@@ -78,10 +80,10 @@
 	if ( owner == thrd && !multi_acquisition) {
 		fprintf(stderr, "A single acquisition lock holder attempted to reacquire the lock resulting in a deadlock."); // Possibly throw instead
-		exit(EXIT_FAILURE);
+    	exit(EXIT_FAILURE);
 	} else if ( owner != 0p && owner != thrd ) {
 		append( blocked_threads, thrd );
 		wait_count++;
 		unlock( lock );
-		park( __cfaabi_dbg_ctx );
+		park( );
 	} else if ( owner == thrd && multi_acquisition ) {
 		recursion_count++;
@@ -115,5 +117,5 @@
 		fprintf( stderr, "There was an attempt to release a lock that isn't held" );
 		return;
-	} else if ( strict_owner && owner != active_thread() ) {
+	} else if ( strict_owner && active_thread() ) {
 		fprintf( stderr, "A thread other than the owner attempted to release an owner lock" );
 		return;
@@ -125,5 +127,5 @@
 		recursion_count = ( thrd && multi_acquisition ? 1 : 0 );
 		wait_count--;
-		unpark( thrd __cfaabi_dbg_ctx2 );
+		unpark( thrd );
 	}
 	unlock( lock );
@@ -152,5 +154,8 @@
 		owner = t;
 		if ( multi_acquisition ) recursion_count = 1;
-		unpark( t __cfaabi_dbg_ctx2 );
+		#if !defined( __CFA_NO_STATISTICS__ )
+			kernelTLS.this_stats = t->curr_cluster->stats;
+		#endif
+		unpark( t );
 		unlock( lock );
 	}
@@ -161,5 +166,5 @@
 	if ( owner == 0p ){ // no owner implies lock isn't held
 		fprintf( stderr, "A lock that is not held was passed to a synchronization lock" );
-	} else if ( strict_owner && owner != active_thread() ) {
+	} else if ( strict_owner && active_thread() ) {
 		fprintf( stderr, "A thread other than the owner of a lock passed it to a synchronization lock" );
 	} else {
@@ -168,5 +173,5 @@
 		recursion_count = ( thrd && multi_acquisition ? 1 : 0 );
 		wait_count--;
-		unpark( thrd __cfaabi_dbg_ctx2 );
+		unpark( thrd );
 	}
 	unlock( lock );
@@ -177,7 +182,5 @@
 ///////////////////////////////////////////////////////////////////
 
-// In an ideal world this may not be necessary
-// Is it possible for nominal inheritance to inherit traits??
-// If that occurs we would avoid all this extra code
+// This is temporary until an inheritance bug is fixed
 
 void lock( mutex_lock & this ){
@@ -230,21 +233,38 @@
 
 ///////////////////////////////////////////////////////////////////
-//// Synchronization Locks
+//// condition variable
 ///////////////////////////////////////////////////////////////////
 
 forall(dtype L | is_blocking_lock(L)) {
-	void ?{}( synchronization_lock(L) & this, bool reacquire_after_signal ){
+
+	void timeout_handler ( alarm_node_wrap(L) & this ) with( this ) {
+    	// This condition_variable member is called from the kernel, and therefore, cannot block, but it can spin.
+	    lock( cond->lock __cfaabi_dbg_ctx2 );
+	    if ( (*i)->listed ) {			// is thread on queue
+	    	info_thread(L) * copy = *i;
+			remove( cond->blocked_threads, i );		 //remove this thread O(1)
+			cond->wait_count--;
+			if( !copy->lock ) {
+				unlock( cond->lock );
+				#if !defined( __CFA_NO_STATISTICS__ )
+					#warning unprotected access to tls TODO discuss this
+					kernelTLS.this_stats = copy->t->curr_cluster->stats;
+				#endif
+				unpark( copy->t );
+	    	} else {
+	    		add_(*copy->lock, copy->t);			// call lock's add_
+	    	}
+	    }
+	    unlock( cond->lock );
+	}
+
+	void alarm_node_wrap_cast( alarm_node_t & a ) {
+		timeout_handler( (alarm_node_wrap(L) &)a );
+	}
+
+	void ?{}( condition_variable(L) & this ){
 		this.lock{};
 		this.blocked_threads{};
 		this.count = 0;
-		this.reacquire_after_signal = reacquire_after_signal;
-	}
-
-	void ^?{}( synchronization_lock(L) & this ){
-		// default
-	}
-
-	void ?{}( condition_variable(L) & this ){
-		((synchronization_lock(L) &)this){ true };
 	}
 
@@ -253,23 +273,23 @@
 	}
 
-	void ?{}( thread_queue(L) & this ){
-		((synchronization_lock(L) &)this){ false };
-	}
-
-	void ^?{}( thread_queue(L) & this ){
+	void ?{}( alarm_node_wrap(L) & this, $thread * thrd, Time alarm, Duration period, Alarm_Callback callback ) {
+		this.alarm_node{ thrd, alarm, period, callback };
+	}
+
+	void ^?{}( alarm_node_wrap(L) & this ) {
 		// default
 	}
 
-	bool notify_one( synchronization_lock(L) & this ) with( this ) {
+	bool notify_one( condition_variable(L) & this ) with( this ) {
 		lock( lock __cfaabi_dbg_ctx2 );
 		bool ret = !!blocked_threads;
 		info_thread(L) * popped = pop_head( blocked_threads );
+		popped->listed = false;
 		if(popped != 0p) {
-			if( reacquire_after_signal ){
+			count--;
+			if (popped->lock) {
 				add_(*popped->lock, popped->t);
 			} else {
-				unpark(
-					popped->t __cfaabi_dbg_ctx2
-				);
+				unpark(popped->t);
 			}
 		}
@@ -278,16 +298,16 @@
 	}
 
-	bool notify_all( synchronization_lock(L) & this ) with(this) {
+	bool notify_all( condition_variable(L) & this ) with(this) {
 		lock( lock __cfaabi_dbg_ctx2 );
 		bool ret = blocked_threads ? true : false;
 		while( blocked_threads ) {
 			info_thread(L) * popped = pop_head( blocked_threads );
+			popped->listed = false;
 			if(popped != 0p){
-				if( reacquire_after_signal ){
+				count--;
+				if (popped->lock) {
 					add_(*popped->lock, popped->t);
 				} else {
-					unpark(
-						popped->t __cfaabi_dbg_ctx2
-					);
+					unpark(popped->t);
 				}
 			}
@@ -297,134 +317,127 @@
 	}
 
-	uintptr_t front( synchronization_lock(L) & this ) with(this) {
-		return (*peek(blocked_threads)).info;
-	}
-
-	bool empty( synchronization_lock(L) & this ) with(this) {
+	uintptr_t front( condition_variable(L) & this ) with(this) {
+		if(!blocked_threads) return NULL;
+		return peek(blocked_threads)->info;
+	}
+
+	bool empty( condition_variable(L) & this ) with(this) {
 		return blocked_threads ? false : true;
 	}
 
-	int counter( synchronization_lock(L) & this ) with(this) {
+	int counter( condition_variable(L) & this ) with(this) {
 		return count;
 	}
 
-	void queue_info_thread( synchronization_lock(L) & this, info_thread(L) & i ) with(this) {
-		lock( lock __cfaabi_dbg_ctx2 );
-		append( blocked_threads, &i );
-		count++;
-		unlock( lock );
-		park( __cfaabi_dbg_ctx );
-	}
-
-
-	void wait( synchronization_lock(L) & this ) with(this) {
-		info_thread( L ) i = { active_thread() };
-		queue_info_thread( this, i );
-	}
-
-	void wait( synchronization_lock(L) & this, uintptr_t info ) with(this) {
-		info_thread( L ) i = { active_thread(), info };
-		queue_info_thread( this, i );
-	}
-	// I still need to implement the time delay wait routines
-	bool wait( synchronization_lock(L) & this, Duration duration ) with(this) {
-		timeval tv = { time(0) };
-		Time t = { tv };
-		return wait( this, t + duration );
-	}
-
-	bool wait( synchronization_lock(L) & this, uintptr_t info, Duration duration ) with(this) {
-		// TODO: ADD INFO
-		return wait( this, duration );
-	}
-
-	bool wait( synchronization_lock(L) & this, Time time ) with(this) {
-		return false; //default
-	}
-
-	bool wait( synchronization_lock(L) & this, uintptr_t info, Time time ) with(this) {
-		// TODO: ADD INFO
-		return wait( this, time );
-	}
-
-	void queue_info_thread_unlock( synchronization_lock(L) & this, L & l, info_thread(L) & i ) with(this) {
+	// helper for wait()'s' without a timeout
+	void queue_info_thread( condition_variable(L) & this, info_thread(L) & i ) with(this) {
 		lock( lock __cfaabi_dbg_ctx2 );
 		append( this.blocked_threads, &i );
 		count++;
-		i.lock = &l;
-		size_t recursion_count = get_recursion_count(l);
-		remove_( l );
-		unlock( lock );
-		park( __cfaabi_dbg_ctx ); // blocks here
-
-		set_recursion_count(l, recursion_count); // resets recursion count here after waking
-	}
-
-	void wait( synchronization_lock(L) & this, L & l ) with(this) {
+		i.listed = true;
+		size_t recursion_count;
+		if (i.lock) {
+			recursion_count = get_recursion_count(*i.lock);
+			remove_( *i.lock );
+		}
+
+		unlock( lock );
+		park( ); // blocks here
+
+		if (i.lock) set_recursion_count(*i.lock, recursion_count); // resets recursion count here after waking
+	}
+
+	// helper for wait()'s' with a timeout
+	void queue_info_thread_timeout( condition_variable(L) & this, info_thread(L) & info, Time t ) with(this) {
+		lock( lock __cfaabi_dbg_ctx2 );
+
+		info_thread(L) * queue_ptr = &info;
+
+		alarm_node_wrap(L) node_wrap = { info.t, t, 0`s, alarm_node_wrap_cast };
+		node_wrap.cond = &this;
+		node_wrap.i = &queue_ptr;
+
+		register_self( &node_wrap.alarm_node );
+
+		append( blocked_threads, queue_ptr );
+		info.listed = true;
+		count++;
+
+		size_t recursion_count;
+		if (info.lock) {
+			recursion_count = get_recursion_count(*info.lock);
+			remove_( *info.lock );
+		}
+
+		unlock( lock );
+		park();
+
+		if (info.lock) set_recursion_count(*info.lock, recursion_count);
+	}
+
+	void wait( condition_variable(L) & this ) with(this) {
+		info_thread( L ) i = { active_thread() };
+		queue_info_thread( this, i );
+	}
+
+	void wait( condition_variable(L) & this, uintptr_t info ) with(this) {
+		info_thread( L ) i = { active_thread(), info };
+		queue_info_thread( this, i );
+	}
+
+	void wait( condition_variable(L) & this, Duration duration ) with(this) {
+		info_thread( L ) i = { active_thread() };
+		queue_info_thread_timeout(this, i, __kernel_get_time() + duration );
+	}
+
+	void wait( condition_variable(L) & this, uintptr_t info, Duration duration ) with(this) {
+		info_thread( L ) i = { active_thread(), info };
+		queue_info_thread_timeout(this, i, __kernel_get_time() + duration );
+	}
+
+	void wait( condition_variable(L) & this, Time time ) with(this) {
+		info_thread( L ) i = { active_thread() };
+		queue_info_thread_timeout(this, i, time);
+	}
+
+	void wait( condition_variable(L) & this, uintptr_t info, Time time ) with(this) {
+		info_thread( L ) i = { active_thread(), info };
+		queue_info_thread_timeout(this, i, time);
+	}
+
+	void wait( condition_variable(L) & this, L & l ) with(this) {
 		info_thread(L) i = { active_thread() };
-		queue_info_thread_unlock( this, l, i );
-	}
-
-	void wait( synchronization_lock(L) & this, L & l, uintptr_t info ) with(this) {
+		i.lock = &l;
+		queue_info_thread( this, i );
+	}
+
+	void wait( condition_variable(L) & this, L & l, uintptr_t info ) with(this) {
 		info_thread(L) i = { active_thread(), info };
-		queue_info_thread_unlock( this, l, i );
-	}
-
-	bool wait( synchronization_lock(L) & this, L & l, Duration duration ) with(this) {
-		timeval tv = { time(0) };
-		Time t = { tv };
-		return wait( this, l, t + duration );
-	}
-
-	bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Duration duration ) with(this) {
-		// TODO: ADD INFO
-		return wait( this, l, duration );
-	}
-
-	bool wait( synchronization_lock(L) & this, L & l, Time time ) with(this) {
-		return false; //default
-	}
-
-	bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Time time ) with(this) {
-		// TODO: ADD INFO
-		return wait( this, l, time );
-	}
-}
-
-///////////////////////////////////////////////////////////////////
-//// condition lock alternative approach
-///////////////////////////////////////////////////////////////////
-
-// the solution below is less efficient but does not require the lock to have a specific add/remove routine
-
-///////////////////////////////////////////////////////////////////
-//// is_simple_lock
-///////////////////////////////////////////////////////////////////
-
-forall(dtype L | is_simple_lock(L)) {
-	void ?{}( condition_lock(L) & this ){
-		// default
-	}
-
-	void ^?{}( condition_lock(L) & this ){
-		// default
-	}
-
-	bool notify_one( condition_lock(L) & this ) with(this) {
-		return notify_one( c_var );
-	}
-
-	bool notify_all( condition_lock(L) & this ) with(this) {
-		return notify_all( c_var );
-	}
-
-	void wait( condition_lock(L) & this, L & l ) with(this) {
-		lock( m_lock );
-		size_t recursion = get_recursion_count( l );
-		unlock( l );
-		wait( c_var, m_lock );
-		lock( l );
-		set_recursion_count( l , recursion );
-		unlock( m_lock );
-	}
-}
+		i.lock = &l;
+		queue_info_thread( this, i );
+	}
+
+	void wait( condition_variable(L) & this, L & l, Duration duration ) with(this) {
+		info_thread(L) i = { active_thread() };
+		i.lock = &l;
+		queue_info_thread_timeout(this, i, __kernel_get_time() + duration );
+	}
+
+	void wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration ) with(this) {
+		info_thread(L) i = { active_thread(), info };
+		i.lock = &l;
+		queue_info_thread_timeout(this, i, __kernel_get_time() + duration );
+	}
+
+	void wait( condition_variable(L) & this, L & l, Time time ) with(this) {
+		info_thread(L) i = { active_thread() };
+		i.lock = &l;
+		queue_info_thread_timeout(this, i, time );
+	}
+
+	void wait( condition_variable(L) & this, L & l, uintptr_t info, Time time ) with(this) {
+		info_thread(L) i = { active_thread(), info };
+		i.lock = &l;
+		queue_info_thread_timeout(this, i, time );
+	}
+}
Index: libcfa/src/concurrency/locks.hfa
===================================================================
--- libcfa/src/concurrency/locks.hfa	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ libcfa/src/concurrency/locks.hfa	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -1,2 +1,4 @@
+#pragma once
+
 #include <stdbool.h>
 
@@ -10,4 +12,5 @@
 #include "time.hfa"
 #include <sys/time.h>
+#include "alarm.hfa"
 
 ///////////////////////////////////////////////////////////////////
@@ -32,4 +35,5 @@
 		info_thread(L) * next;
 		L * lock;
+		bool listed;					// true if info_thread is on queue, false otherwise;
 	};
 
@@ -119,5 +123,5 @@
 ///////////////////////////////////////////////////////////////////
 forall(dtype L | is_blocking_lock(L)) {
-	struct synchronization_lock {
+	struct condition_variable {
 		// Spin lock used for mutual exclusion
 		__spinlock_t lock;
@@ -128,84 +132,45 @@
 		// Count of current blocked threads
 		int count;
-
-		// If true threads will reacquire the lock they block on upon waking
-		bool reacquire_after_signal;
 	};
-
-	struct condition_variable {
-		inline synchronization_lock(L);
-	};
-
-	struct thread_queue {
-		inline synchronization_lock(L);
-	};
-
-
-	void ?{}( synchronization_lock(L) & this, bool multi_acquisition, bool strict_owner );
-	void ^?{}( synchronization_lock(L) & this );
 
 	void ?{}( condition_variable(L) & this );
 	void ^?{}( condition_variable(L) & this );
 
-	void ?{}( thread_queue(L) & this );
-	void ^?{}( thread_queue(L) & this );
+	struct alarm_node_wrap {
+		alarm_node_t alarm_node;
 
-	bool notify_one( synchronization_lock(L) & this );
-	bool notify_all( synchronization_lock(L) & this );
+		condition_variable(L) * cond;
 
-	uintptr_t front( synchronization_lock(L) & this );
-
-	bool empty( synchronization_lock(L) & this );
-	int counter( synchronization_lock(L) & this );
-
-	// wait functions that are not passed a mutex lock
-	void wait( synchronization_lock(L) & this );
-	void wait( synchronization_lock(L) & this, uintptr_t info );
-	bool wait( synchronization_lock(L) & this, Duration duration );
-	bool wait( synchronization_lock(L) & this, uintptr_t info, Duration duration );
-	bool wait( synchronization_lock(L) & this, Time time );
-	bool wait( synchronization_lock(L) & this, uintptr_t info, Time time );
-
-	// wait functions that are passed a lock
-	bool notify_one( synchronization_lock(L) & this, L & l );
-	bool notify_all( synchronization_lock(L) & this, L & l );
-
-	void wait( synchronization_lock(L) & this, L & l );
-	void wait( synchronization_lock(L) & this, L & l, uintptr_t info );
-	bool wait( synchronization_lock(L) & this, L & l, Duration duration );
-	bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Duration duration );
-	bool wait( synchronization_lock(L) & this, L & l, Time time );
-	bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Time time );
-}
-
-///////////////////////////////////////////////////////////////////
-//// condition lock alternative approach
-///////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////
-//// is_simple_lock
-///////////////////////////////////////////////////////////////////
-
-trait is_simple_lock(dtype L | sized(L)) {
-	void lock( L & );		// For synchronization locks to use when acquiring
-	void unlock( L & );    // For synchronization locks to use when releasing
-	size_t get_recursion_count( L & ); // to get recursion count for cond lock to reset after waking
-	void set_recursion_count( L &, size_t recursion ); // to set recursion count after getting signalled;
-};
-
-forall(dtype L | is_simple_lock(L)) {
-	struct condition_lock {
-		// Spin lock used for mutual exclusion
-		mutex_lock m_lock;
-
-		condition_variable( mutex_lock ) c_var;
+		info_thread(L) ** i;
 	};
 
-	void ?{}( condition_lock(L) & this );
-	void ^?{}( condition_lock(L) & this );
+	void ?{}( alarm_node_wrap(L) & this, $thread * thrd, Time alarm, Duration period, Alarm_Callback callback );
+	void ^?{}( alarm_node_wrap(L) & this );
 
-	bool notify_one( condition_lock(L) & this );
-	bool notify_all( condition_lock(L) & this );
-	void wait( condition_lock(L) & this, L & l );
+	void alarm_node_callback( alarm_node_wrap(L) & this );
+
+	void alarm_node_wrap_cast( alarm_node_t & a );
+
+	bool notify_one( condition_variable(L) & this );
+	bool notify_all( condition_variable(L) & this );
+
+	uintptr_t front( condition_variable(L) & this );
+
+	bool empty( condition_variable(L) & this );
+	int counter( condition_variable(L) & this );
+
+	// TODO: look into changing timout routines to return bool showing if signalled or woken by kernel
+	void wait( condition_variable(L) & this );
+	void wait( condition_variable(L) & this, uintptr_t info );
+	void wait( condition_variable(L) & this, Duration duration );
+	void wait( condition_variable(L) & this, uintptr_t info, Duration duration );
+	void wait( condition_variable(L) & this, Time time );
+	void wait( condition_variable(L) & this, uintptr_t info, Time time );
+
+	void wait( condition_variable(L) & this, L & l );
+	void wait( condition_variable(L) & this, L & l, uintptr_t info );
+	void wait( condition_variable(L) & this, L & l, Duration duration );
+	void wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration );
+	void wait( condition_variable(L) & this, L & l, Time time );
+	void wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );
 }
Index: libcfa/src/concurrency/preemption.cfa
===================================================================
--- libcfa/src/concurrency/preemption.cfa	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ libcfa/src/concurrency/preemption.cfa	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -105,9 +105,12 @@
 
 		// Check if this is a kernel
-		if( node->kernel_alarm ) {
+		if( node->type == Kernel ) {
 			preempt( node->proc );
 		}
+		else if( node->type == User ) {
+			timeout( node->thrd );
+		}
 		else {
-			timeout( node->thrd );
+			node->callback(*node);
 		}
 
Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ src/InitTweak/FixGlobalInit.cc	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -183,4 +183,5 @@
 			} // if
 			if ( const ast::Stmt * ctor = ctorInit->ctor ) {
+				addDataSectionAttribute(mutDecl);
 				initStmts.push_back( ctor );
 				mutDecl->init = nullptr;
Index: src/InitTweak/FixInitNew.cpp
===================================================================
--- src/InitTweak/FixInitNew.cpp	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ src/InitTweak/FixInitNew.cpp	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -864,4 +864,5 @@
 			if ( const ast::Stmt * ctor = ctorInit->ctor ) {
 				if ( objDecl->storage.is_static ) {
+					addDataSectionAttribute(objDecl);
 					// originally wanted to take advantage of gcc nested functions, but
 					// we get memory errors with this approach. To remedy this, the static
@@ -947,4 +948,5 @@
 						objDecl->name = objDecl->name + staticNamer.newName();
 						objDecl->mangleName = Mangle::mangle( objDecl );
+						objDecl->init = nullptr;
 
 						// xxx - temporary hack: need to return a declaration, but want to hoist the current object out of this scope
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ src/InitTweak/InitTweak.cc	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -1113,3 +1113,8 @@
 	}
 
+	void addDataSectionAttribute( ast::ObjectDecl * objDecl ) {
+		auto strLitT = new ast::PointerType(new ast::BasicType(ast::BasicType::Char));
+		objDecl->attributes.push_back(new ast::Attribute("section", {new ast::ConstantExpr(objDecl->location, strLitT, "\".data#\"", std::nullopt)}));
+	}
+
 }
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision be73f30f9fc916c25e69cf8448092b2fe7d7d2b8)
+++ src/InitTweak/InitTweak.h	(revision 3959595fcbab91d221eb882dc5976f75a47b5067)
@@ -119,4 +119,6 @@
 	void addDataSectonAttribute( ObjectDecl * objDecl );
 
+	void addDataSectionAttribute( ast::ObjectDecl * objDecl );
+
 	class InitExpander_old {
 	public:
