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. --- arch/sh/atomic_arch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/sh') diff --git a/arch/sh/atomic_arch.h b/arch/sh/atomic_arch.h index d48a7651..0a4d0c11 100644 --- a/arch/sh/atomic_arch.h +++ b/arch/sh/atomic_arch.h @@ -1,3 +1,5 @@ +#include "libc.h" + #if defined(__SH4A__) #define a_ll a_ll @@ -30,7 +32,7 @@ static inline void a_barrier() #else #define a_cas a_cas -__attribute__((__visibility__("hidden"))) extern const void *__sh_cas_ptr; +extern hidden const void *__sh_cas_ptr; static inline int a_cas(volatile int *p, int t, int s) { register int r1 __asm__("r1"); -- cgit v1.2.1