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. --- ldso/dlstart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldso/dlstart.c') diff --git a/ldso/dlstart.c b/ldso/dlstart.c index 4dbe1784..20d50f2c 100644 --- a/ldso/dlstart.c +++ b/ldso/dlstart.c @@ -1,5 +1,6 @@ #include #include "dynlink.h" +#include "libc.h" #ifndef START #define START "_dlstart" @@ -11,14 +12,13 @@ #ifndef GETFUNCSYM #define GETFUNCSYM(fp, sym, got) do { \ - __attribute__((__visibility__("hidden"))) void sym(); \ + hidden void sym(); \ static void (*static_func_ptr)() = sym; \ __asm__ __volatile__ ( "" : "+m"(static_func_ptr) : : "memory"); \ *(fp) = static_func_ptr; } while(0) #endif -__attribute__((__visibility__("hidden"))) -void _dlstart_c(size_t *sp, size_t *dynv) +hidden void _dlstart_c(size_t *sp, size_t *dynv) { size_t i, aux[AUX_CNT], dyn[DYN_CNT]; size_t *rel, rel_size, base; -- cgit v1.2.1