From patchwork Fri Sep 1 18:00:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 22562 Received: (qmail 91830 invoked by alias); 1 Sep 2017 18:01:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 91739 invoked by uid 89); 1 Sep 2017 18:01:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*m:gmail X-HELO: mga02.intel.com X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 48/58] Hide internal __tcgetattr function [BZ #18822] Date: Fri, 1 Sep 2017 11:00:19 -0700 Message-Id: <20170901180029.9527-49-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> 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(+) diff --git a/include/termios.h b/include/termios.h index 1a36e226b8..e2c35ebbae 100644 --- a/include/termios.h +++ b/include/termios.h @@ -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) diff --git a/sysdeps/unix/bsd/tcgetattr.c b/sysdeps/unix/bsd/tcgetattr.c index 1779bb9342..654f1e6407 100644 --- a/sysdeps/unix/bsd/tcgetattr.c +++ b/sysdeps/unix/bsd/tcgetattr.c @@ -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) diff --git a/sysdeps/unix/sysv/linux/tcgetattr.c b/sysdeps/unix/sysv/linux/tcgetattr.c index b1d73d042a..99a59b6cd9 100644 --- a/sysdeps/unix/sysv/linux/tcgetattr.c +++ b/sysdeps/unix/sysv/linux/tcgetattr.c @@ -76,4 +76,5 @@ __tcgetattr (int fd, struct termios *termios_p) return retval; } +libc_hidden_def (__tcgetattr) weak_alias (__tcgetattr, tcgetattr) diff --git a/termios/tcgetattr.c b/termios/tcgetattr.c index a5c076b1b0..12a56dd30f 100644 --- a/termios/tcgetattr.c +++ b/termios/tcgetattr.c @@ -39,4 +39,5 @@ __tcgetattr (int fd, struct termios *termios_p) } stub_warning (tcgetattr) +libc_hidden_def (__tcgetattr) weak_alias (__tcgetattr, tcgetattr)