Index: uspace/app/dltest/dltest.c
===================================================================
--- uspace/app/dltest/dltest.c	(revision 91e4567f3f992dd7a5a1d0c5cd1ce21569453fd0)
+++ uspace/app/dltest/dltest.c	(revision 0dc9a474237e8ccc9e129b032001e4775b9957dd)
@@ -256,4 +256,172 @@
 }
 
+/** Test calling a function that returns contents of a private initialized
+ * fibril-local variable.
+ */
+static bool test_dlfcn_dl_get_private_fib_var(void)
+{
+	int (*p_dl_get_private_fib_var)(void);
+	int val;
+
+	printf("Call dlsym/dl_get_private_fib_var...\n");
+
+	p_dl_get_private_fib_var = dlsym(handle, "dl_get_private_fib_var");
+	if (p_dl_get_private_fib_var == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = p_dl_get_private_fib_var();
+
+	printf("Got %d, expected %d... ", val, dl_private_fib_var_val);
+	if (val != dl_private_fib_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test calling a function that returns contents of a private uninitialized
+ * fibril-local variable.
+ */
+static bool test_dlfcn_dl_get_private_fib_uvar(void)
+{
+	int (*p_dl_get_private_fib_uvar)(void);
+	int val;
+
+	printf("Call dlsym/dl_get_private_fib_uvar...\n");
+
+	p_dl_get_private_fib_uvar = dlsym(handle, "dl_get_private_fib_uvar");
+	if (p_dl_get_private_fib_uvar == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = p_dl_get_private_fib_uvar();
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test calling a function that returns the contents of a public initialized
+ * fibril-local variable.
+ */
+static bool test_dlfcn_dl_get_public_fib_var(void)
+{
+	int (*p_dl_get_public_fib_var)(void);
+	int val;
+
+	printf("Call dlsym/dl_get_public_fib_var...\n");
+
+	p_dl_get_public_fib_var = dlsym(handle, "dl_get_public_fib_var");
+	if (p_dl_get_public_fib_var == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = p_dl_get_public_fib_var();
+
+	printf("Got %d, expected %d... ", val, dl_public_fib_var_val);
+	if (val != dl_public_fib_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test calling a function that returns the contents of a public uninitialized
+ * fibril-local variable.
+ */
+static bool test_dlfcn_dl_get_public_fib_uvar(void)
+{
+	int (*p_dl_get_public_fib_uvar)(void);
+	int val;
+
+	printf("Call dlsym/dl_get_public_fib_uvar...\n");
+
+	p_dl_get_public_fib_uvar = dlsym(handle, "dl_get_public_fib_uvar");
+	if (p_dl_get_public_fib_uvar == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = p_dl_get_public_fib_uvar();
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly reading a public initialized fibril-local variable
+ * whose address was obtained using dlsym.
+ */
+static bool test_dlfcn_read_public_fib_var(void)
+{
+	int *p_dl_public_fib_var;
+	int val;
+
+	printf("Read dlsym/dl_public_fib_var...\n");
+
+	p_dl_public_fib_var = dlsym(handle, "dl_public_fib_var");
+	if (p_dl_public_fib_var == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = *p_dl_public_fib_var;
+
+	printf("Got %d, expected %d... ", val, dl_public_fib_var_val);
+	if (val != dl_public_fib_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly reading a public uninitialized fibril-local variable
+ * whose address was obtained using dlsym.
+ */
+static bool test_dlfcn_read_public_fib_uvar(void)
+{
+	int *p_dl_public_fib_uvar;
+	int val;
+
+	printf("Read dlsym/dl_public_fib_uvar...\n");
+
+	p_dl_public_fib_uvar = dlsym(handle, "dl_public_fib_uvar");
+	if (p_dl_public_fib_uvar == NULL) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	val = *p_dl_public_fib_uvar;
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
 #ifdef DLTEST_LINKED
 
@@ -388,4 +556,126 @@
 
 	val = dl_public_uvar;
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test dircetly calling a function that returns contents of a private
+ * initialized fibril-local variable.
+ */
+static bool test_lnk_dl_get_private_fib_var(void)
+{
+	int val;
+
+	printf("Call linked dl_get_private_fib_var...\n");
+
+	val = dl_get_private_fib_var();
+
+	printf("Got %d, expected %d... ", val, dl_private_fib_var_val);
+	if (val != dl_private_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test dircetly calling a function that returns contents of a private
+ * uninitialized fibril-local variable.
+ */
+static bool test_lnk_dl_get_private_fib_uvar(void)
+{
+	int val;
+
+	printf("Call linked dl_get_private_fib_uvar...\n");
+
+	val = dl_get_private_fib_uvar();
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly calling a function that returns the contents of a public
+ * initialized fibril-local variable.
+ */
+static bool test_lnk_dl_get_public_fib_var(void)
+{
+	int val;
+
+	printf("Call linked dl_get_public_fib_var...\n");
+
+	val = dl_get_public_fib_var();
+
+	printf("Got %d, expected %d... ", val, dl_public_fib_var_val);
+	if (val != dl_public_fib_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly calling a function that returns the contents of a public
+ * uninitialized fibril-local variable.
+ */
+static bool test_lnk_dl_get_public_fib_uvar(void)
+{
+	int val;
+
+	printf("Call linked dl_get_public_fib_uvar...\n");
+
+	val = dl_get_public_fib_uvar();
+
+	printf("Got %d, expected %d... ", val, 0);
+	if (val != 0) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly reading a public initialized fibril-local variable. */
+static bool test_lnk_read_public_fib_var(void)
+{
+	int val;
+
+	printf("Read linked dl_public_fib_var...\n");
+
+	val = dl_public_fib_var;
+
+	printf("Got %d, expected %d... ", val, dl_public_fib_var_val);
+	if (val != dl_public_fib_var_val) {
+		printf("FAILED\n");
+		return false;
+	}
+
+	printf("Passed\n");
+	return true;
+}
+
+/** Test directly reading a public uninitialized fibril-local variable. */
+static bool test_lnk_read_public_fib_uvar(void)
+{
+	int val;
+
+	printf("Read linked dl_public_fib_uvar...\n");
+
+	val = dl_public_fib_uvar;
 
 	printf("Got %d, expected %d... ", val, 0);
@@ -439,4 +729,22 @@
 		return 1;
 
+	if (!test_dlfcn_dl_get_private_fib_var())
+		return 1;
+
+	if (!test_dlfcn_dl_get_private_fib_uvar())
+		return 1;
+
+	if (!test_dlfcn_dl_get_public_fib_var())
+		return 1;
+
+	if (!test_dlfcn_dl_get_public_fib_uvar())
+		return 1;
+
+	if (!test_dlfcn_read_public_fib_var())
+		return 1;
+
+	if (!test_dlfcn_read_public_fib_uvar())
+		return 1;
+
 #ifdef DLTEST_LINKED
 	if (!test_lnk_dl_get_constant())
@@ -459,4 +767,22 @@
 
 	if (!test_lnk_read_public_uvar())
+		return 1;
+
+	if (!test_lnk_dl_get_private_fib_var())
+		return 1;
+
+	if (!test_lnk_dl_get_private_fib_uvar())
+		return 1;
+
+	if (!test_lnk_dl_get_public_fib_var())
+		return 1;
+
+	if (!test_lnk_dl_get_public_fib_uvar())
+		return 1;
+
+	if (!test_lnk_read_public_fib_var())
+		return 1;
+
+	if (!test_lnk_read_public_fib_uvar())
 		return 1;
 #endif
Index: uspace/lib/dltest/dltest.c
===================================================================
--- uspace/lib/dltest/dltest.c	(revision 91e4567f3f992dd7a5a1d0c5cd1ce21569453fd0)
+++ uspace/lib/dltest/dltest.c	(revision 0dc9a474237e8ccc9e129b032001e4775b9957dd)
@@ -34,4 +34,5 @@
  */
 
+#include <fibril.h>
 #include "libdltest.h"
 
@@ -45,4 +46,14 @@
 /** Public uninitialized variable */
 int dl_public_uvar;
+
+/** Private initialized fibril-local variable */
+static fibril_local int dl_private_fib_var = dl_private_fib_var_val;
+/** Private uninitialized fibril-local variable */
+static fibril_local int dl_private_fib_uvar;
+
+/** Public initialized fibril-local variable */
+fibril_local int dl_public_fib_var = dl_public_fib_var_val;
+/** Public uninitialized fibril-local variable */
+fibril_local int dl_public_fib_uvar;
 
 /** Return constant value. */
@@ -76,4 +87,28 @@
 }
 
+/** Return value of private initialized fibril-local variable */
+int dl_get_private_fib_var(void)
+{
+	return dl_private_fib_var;
+}
+
+/** Return value of private uninitialized fibril-local variable */
+int dl_get_private_fib_uvar(void)
+{
+	return dl_private_fib_uvar;
+}
+
+/** Return value of public initialized fibril-local variable */
+int dl_get_public_fib_var(void)
+{
+	return dl_public_fib_var;
+}
+
+/** Return value of public uninitialized fibril-local variable */
+int dl_get_public_fib_uvar(void)
+{
+	return dl_public_fib_uvar;
+}
+
 /**
  * @}
Index: uspace/lib/dltest/libdltest.h
===================================================================
--- uspace/lib/dltest/libdltest.h	(revision 91e4567f3f992dd7a5a1d0c5cd1ce21569453fd0)
+++ uspace/lib/dltest/libdltest.h	(revision 0dc9a474237e8ccc9e129b032001e4775b9957dd)
@@ -37,8 +37,12 @@
 #define LIBDLTEST_H
 
+#include <fibril.h>
+
 enum {
 	dl_constant = 110011,
 	dl_private_var_val = 220022,
-	dl_public_var_val = 330033
+	dl_public_var_val = 330033,
+	dl_private_fib_var_val = 220022,
+	dl_public_fib_var_val = 330033
 };
 
@@ -48,7 +52,13 @@
 extern int dl_get_public_var(void);
 extern int dl_get_public_uvar(void);
+extern int dl_get_private_fib_var(void);
+extern int dl_get_private_fib_uvar(void);
+extern int dl_get_public_fib_var(void);
+extern int dl_get_public_fib_uvar(void);
 
 extern int dl_public_var;
 extern int dl_public_uvar;
+extern fibril_local int dl_public_fib_var;
+extern fibril_local int dl_public_fib_uvar;
 
 #endif
