Index: uspace/lib/c/arch/sparc64/src/tls.c
===================================================================
--- uspace/lib/c/arch/sparc64/src/tls.c	(revision 4f205248dfb2dd7692ef1b857648ba9d96fe496c)
+++ uspace/lib/c/arch/sparc64/src/tls.c	(revision 401415aa8fcb6902c643bf1c028f08be8f7c2d8e)
@@ -38,4 +38,8 @@
 #include <stddef.h>
 
+#ifdef CONFIG_RTLD
+#include <rtld/rtld.h>
+#endif
+
 tcb_t *tls_alloc_arch(size_t size, size_t align)
 {
@@ -48,4 +52,30 @@
 }
 
+/*
+ * Rtld TLS support
+ */
+
+typedef struct {
+	unsigned long int ti_module;
+	unsigned long int ti_offset;
+} tls_index;
+
+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);
+	}
+#endif
+	/* Get address of static TLS block */
+	tls = tls_get();
+	return tls + ti->ti_offset;
+}
+
 /** @}
  */
