glibc/sysdeps
Joseph Myers c21d37deb2 Create hidden aliases for non-libc syscalls automatically.
The syscall wrappers mechanism automatically creates hidden aliases
for syscalls with libc_hidden_def / libc_hidden_weak.  The use of
libc_hidden_* has the side-effect that for syscall wrappers in
non-libc libraries those aliases are not created.  In turn, this means
that three mq_* syscalls in sysdeps/unix/sysv/linux/syscalls.list list
the __GI_* names explicitly.

The use of libc_hidden_* dates back to the original introduction of
that support in

2002-08-03  Roland McGrath  <roland@redhat.com>

        * sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or
        libc_hidden_weak for every system call symbol defined.

(predating the non-libc syscalls in question) and I see no reason for
excluding non-libc syscalls.  This patch changes the code to use
hidden_def / hidden_weak (via a wrapper syscall_hidden_def in the case
where the argument is itself a macro, so that the argument gets
expanded before concatenation with __GI_), so avoiding the need to
specify the hidden aliases explicitly in this case.

Tested for x86_64 and x86 (testsuite, and that disassembly of
installed stripped shared libraries is unchanged by the patch; the
mq_* symbols change from weak to strong, which is of no significance
and two of them will shortly change back to weak as part of a fix for
bug 18545).

	* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Use
	hidden_def and hidden_weak instead of libc_hidden_def and
	libc_hidden_weak.
	(top level): Refer to hidden_def in comment.
	* sysdeps/unix/syscall-template.S (syscall_hidden_def): New
	macro.  Use it instead of libc_hidden_def.
	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedsend): Do not
	specify __GI_* name explicitly.
	(mq_timedreceive): Likewise.
	(mq_setattr): Likewise.
2015-06-17 20:17:49 +00:00
..
aarch64 [AArch64] Fix cfi_adjust_cfa_offset usage in dl-tlsdesc.S 2015-06-17 12:44:53 +01:00
alpha alpha: Update libm-test-ulps 2015-05-19 09:43:54 -07:00
arm NaCl: Provide non-default values for uname. 2015-05-12 10:54:47 -07:00
generic Refactoring of START for conditions in individual tests 2015-05-14 18:07:06 +03:00
gnu hurd: fix unwind-resume.c build 2015-02-08 18:46:00 +01:00
hppa hppa: Fix feupdateenv and fesetexceptflag (Bug 18111). 2015-03-11 02:48:59 -04:00
i386 Fix regcomp wcscoll, wcscmp namespace (bug 18497). 2015-06-09 21:07:30 +00:00
ia64 Set errno for log1p on pole/domain error. 2015-04-13 21:19:27 +02:00
ieee754 Replace finite with isfinite. 2015-06-03 16:35:44 +01:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k Set errno for log1p on pole/domain error. 2015-04-13 21:19:27 +02:00
mach Fix getlogin_r namespace (bug 18527). 2015-06-12 20:02:30 +00:00
microblaze Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
mips Fix mips16 __fpu_control static linking (bug 18397). 2015-05-11 22:58:10 +00:00
nacl NaCl: Implement nacl_interface_ext_supply entry point. 2015-06-03 13:51:11 -07:00
nios2 Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
nptl NPTL: Remove duplicate definition of PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP 2015-03-28 01:50:12 -04:00
posix posix_fallocate: Emulation fixes and documentation [BZ #15661] 2015-06-05 10:50:38 +02:00
powerpc Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
pthread Fix aio_* pread namespace (bug 18519). 2015-06-12 17:34:11 +00:00
s390 S/390: Regenerate ULPs 2015-04-24 13:37:48 +02:00
sh Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
sparc Fix mq_notify pthread_barrier_* namespace (bug 18544). 2015-06-17 20:16:56 +00:00
tile Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
unix Create hidden aliases for non-libc syscalls automatically. 2015-06-17 20:17:49 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00
x86_64 Vector pow for x86_64 and tests. 2015-06-17 16:22:26 +03:00