Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision c74b9de1187f3b60a7db1aad1e1fcd51ae134f24)
+++ uspace/srv/loader/main.c	(revision e394c1962a6fec2218e561da2994f4070e2be503)
@@ -59,4 +59,5 @@
 #include <vfs/vfs.h>
 #include <vfs/inbox.h>
+#include <libc.h>
 
 #ifdef CONFIG_RTLD
@@ -357,4 +358,5 @@
 	DPRINTF("Jump to entry point at %p\n", pcb.entry);
 
+	__libc_fini();
 	__tcb_reset();
 	entry_point_jmp(prog_info.finfo.entry, &pcb);
