mirror of git://git.musl-libc.org/musl
use hidden visibility rather than protected for syscall internals
the use of visibility at all is purely an optimization to avoid the need for the caller to load the GOT register or similar to prepare for a call via the PLT. there is no reason for these symbols to be externally visible, so hidden works just as well as protected, and using protected visibility is undesirable due to toolchain bugs and the lack of testing it receives. in particular, GCC's microblaze target is known to generate symbolic relocations in the GOT for functions with protected visibility. this in turn results in a dynamic linker which crashes under any nontrivial usage that requires making a syscall before symbolic relocations are processed.
This commit is contained in:
parent
73c870ed32
commit
83c98aac4c
|
@ -10,7 +10,7 @@ typedef long syscall_arg_t;
|
|||
#endif
|
||||
|
||||
#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
|
||||
__attribute__((visibility("protected")))
|
||||
__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,
|
||||
|
|
Loading…
Reference in New Issue