From patchwork Wed Oct 14 22:45:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 530422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 69DDA140E41 for ; Thu, 15 Oct 2015 09:45:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=rCyOqpik; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=xPLeR+OBKHmUY9Eh KNwF77Dq4fgL9J1fQZmwpVh6d3QwrnRl4id4oAjmh1IHs/nxjXg2uN7VSDvqWc8s SWRxyWexia/Pe47HfWduluuasWl5y8ib6XAE/pVZxfKDgHMg9Y1gl6tr5vZqiIF5 ccs598c8bGS+hHNuKZjrqQ/Evc0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; s=default; bh=7NWdMb5hhwb9oWy5QxarUP GZRD0=; b=rCyOqpikW0tnVTQKD5aGfxDb7FkR5USkwMIHO/Dk6nsz04OkjLCct7 GzSI7NqlItrA2O8ItjvPKTHjV9fmKLzZgYFqLSuARVxJ3YyagSk5Py/7r0JNeR1j TvBbOtPvWh1Yj9uNfdw7ueDxdf0r8RVE0ivLokrHmUkqvH25/cJ18= Received: (qmail 41793 invoked by alias); 14 Oct 2015 22:45:51 -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 41697 invoked by uid 89); 14 Oct 2015 22:45:50 -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: mga01.intel.com X-ExtLoop1: 1 Date: Wed, 14 Oct 2015 15:45:47 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 09/19] Mark internal dirent functions hidden Message-ID: <20151014224547.GA30880@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 dirent functions are only used internally in ld.so and libc.so, they can be made hidden. [BZ #19122] * include/dirent.h (__opendirat): Add attribute_hidden. (__getdents): Likewise. (__getdents64): Likewise. (__alloc_dir): Likewise. [IS_IN (rtld)] (__closedir): Likewise. [IS_IN (rtld)] (__fdopendir): Likewise. [IS_IN (rtld)] (__readdir): Likewise. [IS_IN (rtld)] (__readdir64): Likewise. [IS_IN (rtld)] (__rewinddir): Likewise. --- include/dirent.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/include/dirent.h b/include/dirent.h index 258f2d0..c792e53 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -16,7 +16,8 @@ struct scandir_cancel_struct /* Now define the internal interfaces. */ extern DIR *__opendir (const char *__name); -extern DIR *__opendirat (int dfd, const char *__name) internal_function; +extern DIR *__opendirat (int dfd, const char *__name) + internal_function attribute_hidden; extern DIR *__fdopendir (int __fd); extern int __closedir (DIR *__dirp); extern struct dirent *__readdir (DIR *__dirp); @@ -35,9 +36,9 @@ extern __ssize_t __getdirentries (int __fd, char *__restrict __buf, __off_t *__restrict __basep) __THROW __nonnull ((2, 4)); extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes) - internal_function; + internal_function attribute_hidden; extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes) - internal_function; + internal_function attribute_hidden; extern int __alphasort64 (const struct dirent64 **a, const struct dirent64 **b) __attribute_pure__; extern int __versionsort64 (const struct dirent64 **a, @@ -45,7 +46,7 @@ extern int __versionsort64 (const struct dirent64 **a, __attribute_pure__; extern DIR *__alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp) - internal_function; + internal_function attribute_hidden; extern __typeof (rewinddir) __rewinddir; extern void __scandir_cancel_handler (void *arg) attribute_hidden; @@ -74,6 +75,14 @@ libc_hidden_proto (__rewinddir) extern __typeof (scandirat) __scandirat; libc_hidden_proto (__scandirat) libc_hidden_proto (scandirat64) + +# if IS_IN (rtld) +extern __typeof (__closedir) __closedir attribute_hidden; +extern __typeof (__fdopendir) __fdopendir attribute_hidden; +extern __typeof (__readdir) __readdir attribute_hidden; +extern __typeof (__readdir64) __readdir64 attribute_hidden; +extern __typeof (__rewinddir) __rewinddir attribute_hidden; +# endif # endif #endif