From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86075 invoked by alias); 1 Sep 2017 18:00:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 85992 invoked by uid 89); 1 Sep 2017 18:00:54 -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 15/58] Mark internal stdio functions with attribute_hidden [BZ #18822] Date: Fri, 01 Sep 2017 18:00:00 -0000 Message-Id: <20170901180029.9527-16-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> X-SW-Source: 2017-09/txt/msg00057.txt.bz2 Mark internal stdio functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/stdio.h (__fcloseall): Add attribute_hidden. (__getline): Likewise. (__path_search): Likewise. (__gen_tempname): Likewise. (__libc_message): Likewise. (__flockfile): Likewise. (__funlockfile): Likewise. (__fxprintf): Likewise. (__fxprintf_nocancel): Likewise. --- include/stdio.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 7625a2a3a0..f1e987ae5e 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -4,7 +4,7 @@ /* Now define the internal interfaces. */ -extern int __fcloseall (void); +extern int __fcloseall (void) attribute_hidden; extern int __snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); @@ -21,7 +21,7 @@ extern int __vscanf (const char *__restrict __format, _G_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))); extern _IO_ssize_t __getline (char **__lineptr, size_t *__n, - FILE *__stream); + FILE *__stream) attribute_hidden; extern int __vsscanf (const char *__restrict __s, const char *__restrict __format, _G_va_list __arg) @@ -77,10 +77,10 @@ extern FILE *__old_tmpfile (void); /* Generate a unique file name (and possibly open it). */ extern int __path_search (char *__tmpl, size_t __tmpl_len, const char *__dir, const char *__pfx, - int __try_tempdir); + int __try_tempdir) attribute_hidden; extern int __gen_tempname (char *__tmpl, int __suffixlen, int __flags, - int __kind); + int __kind) attribute_hidden; /* The __kind argument to __gen_tempname may be one of: */ # define __GT_FILE 0 /* create a file */ # define __GT_DIR 1 /* create a directory */ @@ -97,7 +97,7 @@ enum __libc_message_action extern void __libc_fatal (const char *__message) __attribute__ ((__noreturn__)); extern void __libc_message (enum __libc_message_action action, - const char *__fnt, ...); + const char *__fnt, ...) attribute_hidden; extern void __fortify_fail (const char *msg) __attribute__ ((__noreturn__)); extern void __fortify_fail_abort (_Bool, const char *msg) __attribute__ ((__noreturn__)) attribute_hidden; @@ -105,10 +105,10 @@ libc_hidden_proto (__fortify_fail) libc_hidden_proto (__fortify_fail_abort) /* Acquire ownership of STREAM. */ -extern void __flockfile (FILE *__stream); +extern void __flockfile (FILE *__stream) attribute_hidden; /* Relinquish the ownership granted for STREAM. */ -extern void __funlockfile (FILE *__stream); +extern void __funlockfile (FILE *__stream) attribute_hidden; /* Try to acquire ownership of STREAM but do not block if it is not possible. */ @@ -118,9 +118,9 @@ extern int __getc_unlocked (FILE *__fp); extern wint_t __getwc_unlocked (FILE *__fp); extern int __fxprintf (FILE *__fp, const char *__fmt, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); + __attribute__ ((__format__ (__printf__, 2, 3))) attribute_hidden; extern int __fxprintf_nocancel (FILE *__fp, const char *__fmt, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); + __attribute__ ((__format__ (__printf__, 2, 3))) attribute_hidden; extern const char *const _sys_errlist_internal[] attribute_hidden; extern int _sys_nerr_internal attribute_hidden; -- 2.13.5