From patchwork Wed Oct 14 22:48:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 9157 Received: (qmail 53817 invoked by alias); 14 Oct 2015 22:48:43 -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 53806 invoked by uid 89); 14 Oct 2015 22:48:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga11.intel.com X-ExtLoop1: 1 Date: Wed, 14 Oct 2015 15:48:39 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 19/19] Mark internel unistd functions hidden Message-ID: <20151014224839.GF30911@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Since internal unistd functions are only used internally in ld.so and libc.so, they can be made hidden. [BZ #19122] * include/unistd.h (__libc_check_standard_fds): Add attribute_hidden. IS_IN (rtld)] (__access): Likewise. IS_IN (rtld)] (__brk): Likewise. IS_IN (rtld)] (__close): Likewise. IS_IN (rtld)] (__getcwd): Likewise. IS_IN (rtld)] (__getpid): Likewise. IS_IN (rtld)] (__libc_read): Likewise. IS_IN (rtld)] (__libc_write): Likewise. IS_IN (rtld)] (__lseek): Likewise. IS_IN (rtld)] (__profil): Likewise. IS_IN (rtld)] (__read): Likewise. IS_IN (rtld)] (__sbrk): Likewise. --- include/unistd.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/unistd.h b/include/unistd.h index fbba393..09a4c6e 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -158,7 +158,7 @@ rtld_hidden_proto (__libc_enable_secure) /* Various internal function. */ -extern void __libc_check_standard_fds (void); +extern void __libc_check_standard_fds (void) attribute_hidden; /* Internal name for fork function. */ @@ -177,6 +177,20 @@ extern int __have_dup3 attribute_hidden; extern int __getlogin_r_loginuid (char *name, size_t namesize) attribute_hidden; +# if IS_IN (rtld) +extern __typeof (__access) __access attribute_hidden; +extern __typeof (__brk) __brk attribute_hidden; +extern __typeof (__close) __close attribute_hidden; +extern __typeof (__getcwd) __getcwd attribute_hidden; +extern __typeof (__getpid) __getpid attribute_hidden; +extern __typeof (__libc_read) __libc_read attribute_hidden; +extern __typeof (__libc_write) __libc_write attribute_hidden; +extern __typeof (__lseek) __lseek attribute_hidden; +extern __typeof (__profil) __profil attribute_hidden; +extern __typeof (__read) __read attribute_hidden; +extern __typeof (__sbrk) __sbrk attribute_hidden; +# endif + __END_DECLS # endif