diff options
| author | Florian Weimer <fweimer@redhat.com> | 2025-05-16 19:53:09 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2025-05-16 19:53:09 +0200 |
| commit | a894f04d877653bea1639fc9a4adf73bd9347bf4 (patch) | |
| tree | 5714300710d74cc535049fda28f1860e53955b1a /locale | |
| parent | 10a66a8e421b09682b774c795ef1da402235dddc (diff) | |
Optimize __libc_tsd_* thread variable access
These variables are not exported, and libc.so TLS is initial-exec
anyway. Declare these variables as hidden and use the initial-exec
TLS model.
Reviewed-by: Frédéric Bérat <fberat@redhat.com>
Diffstat (limited to 'locale')
| -rw-r--r-- | locale/localeinfo.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 40e11865ca..f503792d04 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -237,7 +237,8 @@ extern struct __locale_struct _nl_global_locale attribute_hidden; /* This fetches the thread-local locale_t pointer, either one set with uselocale or &_nl_global_locale. */ #define _NL_CURRENT_LOCALE __libc_tsd_LOCALE -extern __thread locale_t __libc_tsd_LOCALE; +extern __thread locale_t __libc_tsd_LOCALE + attribute_hidden attribute_tls_model_ie; /* For static linking it is desireable to avoid always linking in the code and data for every category when we can tell at link time that they are |
