about summary refs log tree commit diff
path: root/include/signal.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 16:04:26 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 16:04:41 -0700
commit6a088436d4c04b8081e86f9e856f10fba97d0612 (patch)
tree2c229f425eba248cdc13454a71d594d237b87a81 /include/signal.h
parent78cf1d74d28c9312d888dea1ad3de01d38c5fc4a (diff)
downloadglibc-6a088436d4c04b8081e86f9e856f10fba97d0612.tar.gz
glibc-6a088436d4c04b8081e86f9e856f10fba97d0612.tar.xz
glibc-6a088436d4c04b8081e86f9e856f10fba97d0612.zip
Hide internal signal functions [BZ #18822]
Hide internal signal functions to allow direct access within libc.so and
libc.a without using GOT nor PLT.

__GI___kill and __GI___sigaltstack are defined when syscalls.list is
used to generate them.  Otherwise libc_hidden_def is needed explicitly.

	[BZ #18822]
	* include/signal.h (__kill): Add libc_hidden_proto.
	(__sigblock): Likewise.
	(__sigprocmask): Likewise.
	(__sigaltstack): Likewise.
	* signal/kill.c (__kill): Add libc_hidden_def.
	* signal/sigblock.c (__sigblock): Likewise.
	* signal/sigprocmask.c (__sigprocmask): Likewise.
	* sysdeps/mach/hurd/kill.c (__kill): Likewise.
	* sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
	* sysdeps/mach/hurd/sigprocmask.c (__sigprocmask): Likewise.
	* sysdeps/posix/sigblock.c (__sigblock): Likewise.
	* sysdeps/unix/sysv/linux/alpha/sigprocmask.c (__sigprocmask):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/sigprocmask.c (__sigprocmask):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c
	(__sigprocmask): Likewise.
	* sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask):
	Likewise.
	* /sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c
	(__sigprocmask): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigprocmask.c (__sigprocmask):
	Likewise.
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/signal.h b/include/signal.h
index 61ad422dcb..7cbe64b8ad 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -17,13 +17,16 @@ libc_hidden_proto (_sys_siglist)
 /* Now define the internal interfaces.  */
 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
 extern int __kill (__pid_t __pid, int __sig);
+libc_hidden_proto (__kill)
 extern int __sigaction (int __sig, const struct sigaction *__restrict __act,
 			struct sigaction *__restrict __oact);
 libc_hidden_proto (__sigaction)
 extern int __sigblock (int __mask);
+libc_hidden_proto (__sigblock)
 extern int __sigsetmask (int __mask);
 extern int __sigprocmask (int __how,
 			  const sigset_t *__set, sigset_t *__oset);
+libc_hidden_proto (__sigprocmask)
 extern int __sigsuspend (const sigset_t *__set);
 libc_hidden_proto (__sigsuspend)
 extern int __sigwait (const sigset_t *__set, int *__sig);
@@ -40,6 +43,7 @@ extern int __sigreturn (struct sigcontext *__scp);
 #endif
 extern int __sigaltstack (const stack_t *__ss,
 			  stack_t *__oss);
+libc_hidden_proto (__sigaltstack)
 extern int __libc_sigaction (int sig, const struct sigaction *act,
 			     struct sigaction *oact);
 libc_hidden_proto (__libc_sigaction)