Hide internal __tcgetattr function [BZ #18822]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 2 Oct 2017 00:48:11 +0000 (17:48 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 2 Oct 2017 00:48:24 +0000 (17:48 -0700)
Hide internal __tcgetattr function to allow direct access within libc.so
and libc.a without using GOT nor PLT.

[BZ #18822]
* include/termios.h (__tcgetattr): Add libc_hidden_proto.
* sysdeps/unix/bsd/tcgetattr.c (__tcgetattr): Add
libc_hidden_def.
* sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Likewise.
* termios/tcgetattr.c (__tcgetattr): Likewise.

ChangeLog
include/termios.h
sysdeps/unix/bsd/tcgetattr.c
sysdeps/unix/sysv/linux/tcgetattr.c
termios/tcgetattr.c

index 86d30be..dc58bf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #18822]
+       * include/termios.h (__tcgetattr): Add libc_hidden_proto.
+       * sysdeps/unix/bsd/tcgetattr.c (__tcgetattr): Add
+       libc_hidden_def.
+       * sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Likewise.
+       * termios/tcgetattr.c (__tcgetattr): Likewise.
+
+2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18822]
        * include/sys/resource.h (__setrlimit): Add libc_hidden_proto.
        * resource/setrlimit.c (__setrlimit): Add libc_hidden_def.
        * sysdeps/mach/hurd/setrlimit.c (__setrlimit): Likewise.
index 1a36e22..e2c35eb 100644 (file)
@@ -9,6 +9,7 @@ extern int __tcsetattr (int __fd, int __optional_actions,
 
 extern int __libc_tcdrain (int __fd);
 
+libc_hidden_proto (__tcgetattr)
 libc_hidden_proto (tcsetattr)
 libc_hidden_proto (cfsetispeed)
 libc_hidden_proto (cfsetospeed)
index 1779bb9..654f1e6 100644 (file)
@@ -35,4 +35,5 @@ __tcgetattr (int fd, struct termios *termios_p)
   return __ioctl (fd, TIOCGETA, termios_p);
 }
 
+libc_hidden_def (__tcgetattr)
 weak_alias (__tcgetattr, tcgetattr)
index b1d73d0..99a59b6 100644 (file)
@@ -76,4 +76,5 @@ __tcgetattr (int fd, struct termios *termios_p)
   return retval;
 }
 
+libc_hidden_def (__tcgetattr)
 weak_alias (__tcgetattr, tcgetattr)
index a5c076b..12a56dd 100644 (file)
@@ -39,4 +39,5 @@ __tcgetattr (int fd, struct termios *termios_p)
 }
 stub_warning (tcgetattr)
 
+libc_hidden_def (__tcgetattr)
 weak_alias (__tcgetattr, tcgetattr)