about summary refs log tree commit diff
path: root/src/ldso/dynlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r--src/ldso/dynlink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index c436b88f..d564b8f2 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -999,13 +999,16 @@ void *__dynlink(int argc, char **argv)
 
 	if (ssp_used) __init_ssp((void *)aux[AT_RANDOM]);
 
-	atexit(do_fini);
-	do_init_fini(tail);
-
 	errno = 0;
 	return (void *)aux[AT_ENTRY];
 }
 
+void __init_ldso_ctors(void)
+{
+	atexit(do_fini);
+	do_init_fini(tail);
+}
+
 void *dlopen(const char *file, int mode)
 {
 	struct dso *volatile p, *orig_tail, *next;