Index: uspace/lib/c/arch/ia32/include/libarch/rtld/elf_dyn.h
===================================================================
--- uspace/lib/c/arch/ia32/include/libarch/rtld/elf_dyn.h	(revision 32573ffe2f11f1f46237edf372866632f5d0f7f2)
+++ uspace/lib/c/arch/ia32/include/libarch/rtld/elf_dyn.h	(revision 29405acfa4d5067562bc16ee6789b94bfe557964)
@@ -36,5 +36,5 @@
 #define LIBC_ia32_RTLD_ELF_DYN_H_
 
-/* 
+/*
  * ia32 dynamic relocation types
  */
@@ -47,5 +47,7 @@
 #define R_386_RELATIVE	8
 
+#define R_386_TLS_TPOFF    14
 #define R_386_TLS_DTPMOD32 35
+#define R_386_TLS_DTPOFF32 36
 
 #endif
Index: uspace/lib/c/arch/ia32/src/rtld/reloc.c
===================================================================
--- uspace/lib/c/arch/ia32/src/rtld/reloc.c	(revision 32573ffe2f11f1f46237edf372866632f5d0f7f2)
+++ uspace/lib/c/arch/ia32/src/rtld/reloc.c	(revision 29405acfa4d5067562bc16ee6789b94bfe557964)
@@ -115,4 +115,10 @@
 			sym_addr = 0;
 			sym_def = NULL;
+
+			/*
+			 * DTPMOD with null st_name should return the index
+			 * of the current module.
+			 */
+			dest = m;
 		}
 
@@ -171,9 +177,16 @@
 			break;
 
-//		case R_386_TLS_DTPOFF32:
-//			*r_ptr = sym_def->st_value;
-//			break; 
+		case R_386_TLS_TPOFF:
+			DPRINTF("fixup R_386_TLS_TPOFF\n");
+			*r_ptr = (dest->ioffs + sym_def->st_value) - dest->rtld->tls_size;
+			break;
+
+		case R_386_TLS_DTPOFF32:
+			DPRINTF("fixup R_386_TLS_DTPOFF32\n");
+			*r_ptr = sym_def->st_value;
+			break;
 
 		case R_386_TLS_DTPMOD32:
+			DPRINTF("fixup R_386_TLS_DTPMOD32\n");
 			*r_ptr = dest->id;
 			break;
