瀏覽代碼

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.
Rich Felker 11 年之前
父節點
當前提交
3176b57e52
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/env/__libc_start_main.c

+ 3 - 0
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 };