]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Hide internal __sched_setparam function [BZ #18822]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 2 Oct 2017 00:43:13 +0000 (17:43 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 2 Oct 2017 00:43:25 +0000 (17:43 -0700)
Hide internal __sched_setparam function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

__GI___sched_setparam is defined when sysdeps/unix/syscalls.list is
used to generate sched_setparam.  Otherwise libc_hidden_def is needed
explicitly.

[BZ #18822]
* include/sched.h (__sched_setparam): Add libc_hidden_proto.
* posix/sched_setp.c (__sched_setparam): Add libc_hidden_def.

ChangeLog
include/sched.h
posix/sched_setp.c

index 1d9b8a4bbbd7fcbc883e7ab758329aac4be75874..e799d168b70a084dd43c7e84470a52cc46a28ba1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18822]
+       * include/sched.h (__sched_setparam): Add libc_hidden_proto.
+       * posix/sched_setp.c (__sched_setparam): Add libc_hidden_def.
+
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #18822]
index f75faed4ce7e5d62d9eb75a16aa35871a2c7a513..b698f7866689035a8138818b130de79d3dde581c 100644 (file)
@@ -5,6 +5,7 @@
 /* Now define the internal interfaces.  */
 extern int __sched_setparam (__pid_t __pid,
                             const struct sched_param *__param);
+libc_hidden_proto (__sched_setparam)
 extern int __sched_getparam (__pid_t __pid, struct sched_param *__param);
 extern int __sched_setscheduler (__pid_t __pid, int __policy,
                                 const struct sched_param *__param);
index 17c3af322a14d68b8d22fb8c955185b58050f06e..ad50d5abe7c822ba9cb694e1105613d95e85c303 100644 (file)
@@ -29,4 +29,5 @@ __sched_setparam (pid_t pid, const struct sched_param *param)
 }
 stub_warning (sched_setparam)
 
+libc_hidden_def (__sched_setparam)
 weak_alias (__sched_setparam, sched_setparam)