Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision f7981780b553fa33f466e5900f1947df6d56a64a)
+++ uspace/srv/loader/main.c	(revision 7fb3f1c0cd0601d504202af56df44cb8372b7dfe)
@@ -65,4 +65,5 @@
 
 /* From librtld */
+#ifdef CONFIG_RTLD
 #include <rtld.h>
 #include <dynamic.h>
@@ -70,7 +71,8 @@
 #include <module.h>
 
+static int ldr_load_dyn_linked(elf_info_t *p_info);
+#endif
+
 #define DPRINTF(...)
-
-static int ldr_load_dyn_linked(elf_info_t *p_info);
 
 /** Pathname of the file that will be loaded */
@@ -102,7 +104,9 @@
 static bool connected = false;
 
+#ifdef CONFIG_RTLD
 /** State structure of the dynamic linker. */
 runtime_env_t dload_re;
 static module_t prog_mod;
+#endif
 
 static void ldr_get_taskid(ipc_callid_t rid, ipc_call_t *request)
@@ -317,12 +321,17 @@
 	
 	DPRINTF("Binary is dynamically linked.\n");
+#ifdef CONFIG_RTLD
 	DPRINTF(" - pcb address: %p\n", &pcb);
 	DPRINTF( "- prog dynamic: %p\n", prog_info.dynamic);
 
 	rc = ldr_load_dyn_linked(&prog_info);
-
+#else
+	rc = ENOTSUP;
+#endif
 	async_answer_0(rid, rc);
 	return 0;
 }
+
+#ifdef CONFIG_RTLD
 
 static int ldr_load_dyn_linked(elf_info_t *p_info)
@@ -372,4 +381,5 @@
 	return 0;
 }
+#endif
 
 /** Run the previously loaded program.
