From patchwork Fri Sep 1 17:59:33 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: 22509 Received: (qmail 84203 invoked by alias); 1 Sep 2017 18:00:47 -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 83711 invoked by uid 89); 1 Sep 2017 18:00:43 -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 02/58] Mark 3 *_internal functions with attribute_hidden [BZ #18822] Date: Fri, 1 Sep 2017 10:59:33 -0700 Message-Id: <20170901180029.9527-3-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Mark __ptsname_internal, __mktime_internal and __fopen_internal with attribute_hidden to allow direct access to them within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/stdlib.h (__ptsname_internal): Add attribute_hidden. * include/time.h (__mktime_internal): Likewise. * libio/iolibio.h (__fopen_internal): Likewise. --- include/stdlib.h | 2 +- include/time.h | 2 +- libio/iolibio.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index c4a6e6f737..2274790a2e 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -78,7 +78,7 @@ extern char *__realpath (const char *__name, char *__resolved); extern int __ptsname_r (int __fd, char *__buf, size_t __buflen); # ifndef _ISOMAC extern int __ptsname_internal (int fd, char *buf, size_t buflen, - struct stat64 *stp); + struct stat64 *stp) attribute_hidden; # endif extern int __getpt (void); extern int __posix_openpt (int __oflag); diff --git a/include/time.h b/include/time.h index 9fb0e329a3..e8c07bbfea 100644 --- a/include/time.h +++ b/include/time.h @@ -54,7 +54,7 @@ extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) extern time_t __mktime_internal (struct tm *__tp, struct tm *(*__func) (const time_t *, struct tm *), - time_t *__offset); + time_t *__offset) attribute_hidden; extern struct tm *__localtime_r (const time_t *__timer, struct tm *__tp) attribute_hidden; diff --git a/libio/iolibio.h b/libio/iolibio.h index f215fcef01..754d8b0650 100644 --- a/libio/iolibio.h +++ b/libio/iolibio.h @@ -23,7 +23,8 @@ extern _IO_FILE *_IO_fopen (const char*, const char*); extern _IO_FILE *_IO_old_fopen (const char*, const char*); extern _IO_FILE *_IO_new_fopen (const char*, const char*); extern _IO_FILE *_IO_fopen64 (const char*, const char*); -extern _IO_FILE *__fopen_internal (const char*, const char*, int); +extern _IO_FILE *__fopen_internal (const char*, const char*, int) + attribute_hidden; extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW; extern int _IO_fprintf (_IO_FILE*, const char*, ...); extern int _IO_fputs (const char*, _IO_FILE*);