eliminate use of SHARED macro to suppress visibility attributes
this is the first and simplest stage of removal of the SHARED macro, which will eventually allow libc.a and libc.so to be produced from the same object files. the original motivation for these #ifdefs which are now being removed was to allow building a static-only libc using a compiler that does not support visibility. however, SHARED was the wrong condition to test for this anyway; various assembly-language sources refer to hidden symbols and declare them with the .hidden directive, making it wrong to define the referenced symbols as non-hidden. if there is a need in the future to build libc using compilers that lack visibility, support could be moved to the build system or perhaps the __PIC__ macro could be checked instead of SHARED.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#include "pthread_impl.h"
|
||||
#include "syscall.h"
|
||||
|
||||
#ifdef SHARED
|
||||
__attribute__((__visibility__("hidden")))
|
||||
#endif
|
||||
long __syscall_cp_c();
|
||||
|
||||
static long sccp(syscall_arg_t nr,
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "syscall.h"
|
||||
#include "libc.h"
|
||||
|
||||
#ifdef SHARED
|
||||
__attribute__((__visibility__("hidden")))
|
||||
#endif
|
||||
long __cancel(), __syscall_cp_asm(), __syscall_cp_c();
|
||||
|
||||
long __cancel()
|
||||
@@ -47,9 +45,7 @@ static void _sigaddset(sigset_t *set, int sig)
|
||||
set->__bits[s/8/sizeof *set->__bits] |= 1UL<<(s&8*sizeof *set->__bits-1);
|
||||
}
|
||||
|
||||
#ifdef SHARED
|
||||
__attribute__((__visibility__("hidden")))
|
||||
#endif
|
||||
extern const char __cp_begin[1], __cp_end[1], __cp_cancel[1];
|
||||
|
||||
static void cancel_handler(int sig, siginfo_t *si, void *ctx)
|
||||
|
||||
Reference in New Issue
Block a user