From 9b52ab1c9a44b62236089ab0272801d049bc5b1e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 21 Apr 2014 19:31:35 -0400 Subject: micro-optimize some startup code for size moving the call to __init_ssp from __init_security to __init_libc makes __init_security a leaf function, which allows the compiler to make it smaller. __init_libc is already non-leaf, and the additional call makes no difference to the amount of register spillage. in addition, it really made no sense for the call to __init_ssp to be buried inside __init_security rather than parallel with other init functions. --- src/env/__init_security.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/env/__init_security.c') 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; -- cgit v1.2.1