Index: src/InitTweak/FixGlobalInit.cc
===================================================================
--- src/InitTweak/FixGlobalInit.cc	(revision fc134a48a40512fa2957765975077ee1bb642ba2)
+++ src/InitTweak/FixGlobalInit.cc	(revision 1c56bf7102e90c1bc70a37565dadd8a811d1d3e4)
@@ -162,5 +162,5 @@
 			} // if
 			if ( Statement * ctor = ctorInit->ctor ) {
-				addDataSectonAttribute( objDecl );
+				addDataSectionAttribute( objDecl );
 				initStatements.push_back( ctor );
 				objDecl->init = nullptr;
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision fc134a48a40512fa2957765975077ee1bb642ba2)
+++ src/InitTweak/FixInit.cc	(revision 1c56bf7102e90c1bc70a37565dadd8a811d1d3e4)
@@ -806,5 +806,5 @@
 						// 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 );
+						addDataSectionAttribute( objDecl );
 
 						// originally wanted to take advantage of gcc nested functions, but
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision fc134a48a40512fa2957765975077ee1bb642ba2)
+++ src/InitTweak/InitTweak.cc	(revision 1c56bf7102e90c1bc70a37565dadd8a811d1d3e4)
@@ -587,5 +587,5 @@
 
 	bool isConstructable( const ast::Type * type ) {
-		return ! dynamic_cast< const ast::VarArgsType * >( type ) && ! dynamic_cast< const ast::ReferenceType * >( type ) 
+		return ! dynamic_cast< const ast::VarArgsType * >( type ) && ! dynamic_cast< const ast::ReferenceType * >( type )
 		&& ! dynamic_cast< const ast::FunctionType * >( type ) && ! Tuples::isTtype( type );
 	}
@@ -1025,5 +1025,5 @@
 		if (!assign) {
 			auto td = new ast::TypeDecl({}, "T", {}, nullptr, ast::TypeDecl::Dtype, true);
-			assign = new ast::FunctionDecl({}, "?=?", {}, 
+			assign = new ast::FunctionDecl({}, "?=?", {},
 			{ new ast::ObjectDecl({}, "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))),
 			  new ast::ObjectDecl({}, "_src", new ast::TypeInstType("T", td))},
@@ -1095,7 +1095,7 @@
 
 			// address of a variable or member expression is constexpr
-			if ( ! dynamic_cast< const ast::NameExpr * >( arg ) 
-			&& ! dynamic_cast< const ast::VariableExpr * >( arg ) 
-			&& ! dynamic_cast< const ast::MemberExpr * >( arg ) 
+			if ( ! dynamic_cast< const ast::NameExpr * >( arg )
+			&& ! dynamic_cast< const ast::VariableExpr * >( arg )
+			&& ! dynamic_cast< const ast::MemberExpr * >( arg )
 			&& ! dynamic_cast< const ast::UntypedMemberExpr * >( arg ) ) result = false;
 		}
@@ -1241,24 +1241,25 @@
 	}
 
-	void addDataSectonAttribute( ObjectDecl * objDecl ) {
+	#if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
+		#define ASM_COMMENT "#"
+	#else // defined( __ARM_ARCH )
+		#define ASM_COMMENT "//"
+	#endif
+	static const char * const data_section =  ".data" ASM_COMMENT;
+	static const char * const tlsd_section = ".tdata" ASM_COMMENT;
+	void addDataSectionAttribute( ObjectDecl * objDecl ) {
+		const bool is_tls = objDecl->get_storageClasses().is_threadlocal;
+		const char * section = is_tls ? tlsd_section : data_section;
 		objDecl->attributes.push_back(new Attribute("section", {
-			new ConstantExpr( Constant::from_string(".data"
-#if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
-					"#"
-#else // defined( __ARM_ARCH )
-					"//"
-#endif
-				))}));
+			new ConstantExpr( Constant::from_string( section ) )
+		}));
 	}
 
 	void addDataSectionAttribute( ast::ObjectDecl * objDecl ) {
+		const bool is_tls = objDecl->storage.is_threadlocal;
+		const char * section = is_tls ? tlsd_section : data_section;
 		objDecl->attributes.push_back(new ast::Attribute("section", {
-			ast::ConstantExpr::from_string(objDecl->location, ".data"
-#if defined( __x86_64 ) || defined( __i386 ) // assembler comment to prevent assembler warning message
-					"#"
-#else // defined( __ARM_ARCH )
-					"//"
-#endif
-				)}));
+			ast::ConstantExpr::from_string(objDecl->location, section)
+		}));
 	}
 
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision fc134a48a40512fa2957765975077ee1bb642ba2)
+++ src/InitTweak/InitTweak.h	(revision 1c56bf7102e90c1bc70a37565dadd8a811d1d3e4)
@@ -127,5 +127,5 @@
 	///    .section .data#,"a"
 	/// to avoid assembler warning "ignoring changed section attributes for .data"
-	void addDataSectonAttribute( ObjectDecl * objDecl );
+	void addDataSectionAttribute( ObjectDecl * objDecl );
 
 	void addDataSectionAttribute( ast::ObjectDecl * objDecl );
