diff options
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/syscall.h | 2 | ||||
-rw-r--r-- | src/internal/vis.h | 16 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/internal/syscall.h b/src/internal/syscall.h index a93f6d1e..36c772df 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -17,9 +17,7 @@ typedef long syscall_arg_t; #endif -#ifdef SHARED __attribute__((visibility("hidden"))) -#endif long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), __syscall_cp(syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t); diff --git a/src/internal/vis.h b/src/internal/vis.h index bf7a5b20..02bfbda8 100644 --- a/src/internal/vis.h +++ b/src/internal/vis.h @@ -5,11 +5,11 @@ * of position-independent code. */ #ifndef CRT -#ifdef SHARED -/* For shared libc.so, all symbols should be protected, but some toolchains +/* Conceptually, all symbols should be protected, but some toolchains * fail to support copy relocations for protected data, so exclude all - * exported data symbols. */ + * exported data symbols. Also omit visibility for possibly-undefined + * weak references. */ __attribute__((__visibility__("default"))) extern struct _IO_FILE *const stdin, *const stdout, *const stderr; @@ -23,18 +23,10 @@ extern long timezone, __timezone; __attribute__((__visibility__("default"))) extern char *optarg, **environ, **__environ, *tzname[2], *__tzname[2], *__progname, *__progname_full; -#pragma GCC visibility push(protected) - -#elif defined(__PIC__) - -/* If building static libc.a as position-independent code, try to make - * everything hidden except possibly-undefined weak references. */ - __attribute__((__visibility__("default"))) extern void (*const __init_array_start)(), (*const __init_array_end)(), (*const __fini_array_start)(), (*const __fini_array_end)(); -#pragma GCC visibility push(hidden) +#pragma GCC visibility push(protected) #endif -#endif |