about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/env/__init_security.c7
-rw-r--r--src/env/__libc_start_main.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/src/env/__init_security.c b/src/env/__init_security.c
index da5ae948..ae623955 100644
--- a/src/env/__init_security.c
+++ b/src/env/__init_security.c
@@ -5,18 +5,11 @@
 #include "libc.h"
 #include "atomic.h"
 
-static void dummy(void *ent)
-{
-}
-weak_alias(dummy, __init_ssp);
-
 void __init_security(size_t *aux)
 {
 	struct pollfd pfd[3] = { {.fd=0}, {.fd=1}, {.fd=2} };
 	int i;
 
-	__init_ssp((void *)aux[AT_RANDOM]);
-
 	if (aux[AT_UID]==aux[AT_EUID] && aux[AT_GID]==aux[AT_EGID]
 		&& !aux[AT_SECURE]) return;
 
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c
index ac374922..539f72e5 100644
--- a/src/env/__libc_start_main.c
+++ b/src/env/__libc_start_main.c
@@ -11,6 +11,9 @@ extern void (*const __init_array_start)() __attribute__((weak));
 extern void (*const __init_array_end)() __attribute__((weak));
 #endif
 
+static void dummy1(void *p) {}
+weak_alias(dummy1, __init_ssp);
+
 #define AUX_CNT 38
 
 extern size_t __hwcap, __sysinfo;
@@ -33,6 +36,7 @@ void __init_libc(char **envp, char *pn)
 	}
 
 	__init_tls(aux);
+	__init_ssp((void *)aux[AT_RANDOM]);
 	__init_security(aux);
 }