Index: uspace/lib/c/generic/rtld/module.c
===================================================================
--- uspace/lib/c/generic/rtld/module.c	(revision d3e938c65a5927cb5851ec4118dd05109bba3ada)
+++ uspace/lib/c/generic/rtld/module.c	(revision f47c2dc1dbaada74870807f3cccd5bee0e6b69ff)
@@ -50,4 +50,5 @@
 #include <rtld/rtld_arch.h>
 #include <rtld/module.h>
+#include <libarch/rtld/module.h>
 
 #include "../private/libc.h"
@@ -206,5 +207,5 @@
 	DPRINTF("filename:'%s'\n", name_buf);
 
-	rc = elf_load_file_name(name_buf, ELDF_RW, &info);
+	rc = elf_load_file_name(name_buf, RTLD_MODULE_LDF, &info);
 	if (rc != EE_OK) {
 		printf("Failed to load '%s'\n", name_buf);
