From 9b95fd0944e4206949e90633c3fed088202810ec Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 5 Sep 2018 12:43:34 -0400 Subject: define and use internal macros for hidden visibility, weak refs this cleans up what had become widespread direct inline use of "GNU C" style attributes directly in the source, and lowers the barrier to increased use of hidden visibility, which will be useful to recovering some of the efficiency lost when the protected visibility hack was dropped in commit dc2f368e565c37728b0d620380b849c3a1ddd78f, especially on archs where the PLT ABI is costly. --- src/thread/sh/__set_thread_area.c | 9 +++------ src/thread/sh/__unmapself.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/thread/sh') diff --git a/src/thread/sh/__set_thread_area.c b/src/thread/sh/__set_thread_area.c index 9c47f78d..34264bdd 100644 --- a/src/thread/sh/__set_thread_area.c +++ b/src/thread/sh/__set_thread_area.c @@ -7,14 +7,11 @@ #define CPU_HAS_LLSC 0x0040 #define CPU_HAS_CAS_L 0x0400 -__attribute__((__visibility__("hidden"))) -extern const char __sh_cas_gusa[], __sh_cas_llsc[], __sh_cas_imask[], __sh_cas_cas_l[]; +extern hidden const char __sh_cas_gusa[], __sh_cas_llsc[], __sh_cas_imask[], __sh_cas_cas_l[]; -__attribute__((__visibility__("hidden"))) -const void *__sh_cas_ptr; +hidden const void *__sh_cas_ptr; -__attribute__((__visibility__("hidden"))) -unsigned __sh_nommu; +hidden unsigned __sh_nommu; int __set_thread_area(void *p) { diff --git a/src/thread/sh/__unmapself.c b/src/thread/sh/__unmapself.c index d4fb8be5..719392a6 100644 --- a/src/thread/sh/__unmapself.c +++ b/src/thread/sh/__unmapself.c @@ -12,7 +12,7 @@ void __unmapself_sh_nommu(void *, size_t); : : "r"(pc), "r"(sp) : "r0", "memory" ) #include "../__unmapself.c" #undef __unmapself -extern __attribute__((__visibility__("hidden"))) unsigned __sh_nommu; +extern hidden unsigned __sh_nommu; #else #define __sh_nommu 0 #endif -- cgit v1.2.1