Index: uspace/lib/c/arch/ppc32/src/tls.c
===================================================================
--- uspace/lib/c/arch/ppc32/src/tls.c	(revision 4f205248dfb2dd7692ef1b857648ba9d96fe496c)
+++ uspace/lib/c/arch/ppc32/src/tls.c	(revision bc73be3215c832cdb0c8a5022db800902f9f62dc)
@@ -1,3 +1,4 @@
 /*
+ * Copyright (c) 2019 Jiri Svoboda
  * Copyright (c) 2006 Ondrej Palkovsky
  * All rights reserved.
@@ -36,4 +37,8 @@
 #include <stddef.h>
 
+#ifdef CONFIG_RTLD
+#include <rtld/rtld.h>
+#endif
+
 tcb_t *tls_alloc_arch(size_t size, size_t align)
 {
@@ -46,4 +51,32 @@
 }
 
+/*
+ * Rtld TLS support
+ */
+
+typedef struct {
+	unsigned long int ti_module;
+	unsigned long int ti_offset;
+} tls_index;
+
+int __tls_debug = 0;
+
+void *__tls_get_addr(tls_index *ti);
+
+void *__tls_get_addr(tls_index *ti)
+{
+	uint8_t *tls;
+
+#ifdef CONFIG_RTLD
+	if (runtime_env != NULL) {
+		return rtld_tls_get_addr(runtime_env, __tcb_get(),
+		    ti->ti_module, ti->ti_offset) + 0x8000;
+	}
+#endif
+	/* Get address of static TLS block */
+	tls = tls_get();
+	return tls + ti->ti_offset + 0x8000;
+}
+
 /** @}
  */
