about summary refs log tree commit diff
path: root/src/env/__libc_start_main.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-04-21 20:10:08 -0400
committerRich Felker <dalias@aerifal.cx>2014-04-21 20:10:08 -0400
commit3176b57e528f335139f37ada07063f3619158f56 (patch)
tree5bdf33471d4b4efdbfc220c2ba19079149af7050 /src/env/__libc_start_main.c
parentfbcfed7c2d27496063d79e4d2a2a694d0fe67209 (diff)
downloadmusl-3176b57e528f335139f37ada07063f3619158f56.tar.gz
musl-3176b57e528f335139f37ada07063f3619158f56.tar.xz
musl-3176b57e528f335139f37ada07063f3619158f56.zip
make __init_libc static for non-shared libc
being static allows it to be inlined in __libc_start_main; inlining
should take place at all levels since the function is called exactly
once. this further reduces mandatory startup code size for static
binaries.
Diffstat (limited to 'src/env/__libc_start_main.c')
-rw-r--r--src/env/__libc_start_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c
index d7ec3abd..3498afbd 100644
--- a/src/env/__libc_start_main.c
+++ b/src/env/__libc_start_main.c
@@ -22,6 +22,9 @@ weak_alias(dummy1, __init_ssp);
 extern size_t __hwcap, __sysinfo;
 extern char *__progname, *__progname_full;
 
+#ifndef SHARED
+static
+#endif
 void __init_libc(char **envp, char *pn)
 {
 	size_t i, *auxv, aux[AUX_CNT] = { 0 };