[48/58] Hide internal __tcgetattr function [BZ #18822]
Commit Message
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.
---
include/termios.h | 1 +
sysdeps/unix/bsd/tcgetattr.c | 1 +
sysdeps/unix/sysv/linux/tcgetattr.c | 1 +
termios/tcgetattr.c | 1 +
4 files changed, 4 insertions(+)
Comments
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.
>
Tested with build-many-glibcs.py. I am checking it in.
@@ -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)
@@ -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)
@@ -76,4 +76,5 @@ __tcgetattr (int fd, struct termios *termios_p)
return retval;
}
+libc_hidden_def (__tcgetattr)
weak_alias (__tcgetattr, tcgetattr)
@@ -39,4 +39,5 @@ __tcgetattr (int fd, struct termios *termios_p)
}
stub_warning (tcgetattr)
+libc_hidden_def (__tcgetattr)
weak_alias (__tcgetattr, tcgetattr)