From: Rich Felker Date: Thu, 23 Apr 2015 21:04:31 +0000 (-0400) Subject: make __init_tp function static when static linking X-Git-Tag: v1.1.9~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5f51d529155429e607c5c51d5d461b0b98e6be52;p=oweals%2Fmusl.git make __init_tp function static when static linking this slightly reduces the code size cost of TLS/thread-pointer for static linking since __init_tp can be inlined into its only caller and removed. this is analogous to the handling of __init_libc in __libc_start_main, where the function only has external linkage when it needs to be called from the dynamic linker. --- diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c index b5bd80d1..a5074fba 100644 --- a/src/env/__init_tls.c +++ b/src/env/__init_tls.c @@ -8,6 +8,9 @@ #include "atomic.h" #include "syscall.h" +#ifndef SHARED +static +#endif int __init_tp(void *p) { pthread_t td = p;