From patchwork Wed Oct 14 22:46:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 9148 Received: (qmail 42853 invoked by alias); 14 Oct 2015 22:46:02 -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 42841 invoked by uid 89); 14 Oct 2015 22:46:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 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: mga03.intel.com X-ExtLoop1: 1 Date: Wed, 14 Oct 2015 15:46:00 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 10/19] Mark internal fcntl functions hidden Message-ID: <20151014224600.GB30880@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 fcntl functions are only used internally in ld.so and libc.so, they can be made hidden. [BZ #19122] * include/fcntl.h (__libc_fcntl): Add attribute_hidden. [IS_IN (rtld)] (__open): Likewise. [IS_IN (rtld)] (__fcntl): Likewise. --- include/fcntl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/fcntl.h b/include/fcntl.h index de23728..4168ee4 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -8,7 +8,7 @@ libc_hidden_proto (__open64) extern int __libc_open64 (const char *file, int oflag, ...); extern int __libc_open (const char *file, int oflag, ...); libc_hidden_proto (__libc_open) -extern int __libc_fcntl (int fd, int cmd, ...); +extern int __libc_fcntl (int fd, int cmd, ...) attribute_hidden; #ifndef NO_CANCELLATION extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden; libc_hidden_proto (__libc_fcntl) @@ -30,6 +30,11 @@ extern int __openat_2 (int __fd, const char *__path, int __oflag); extern int __openat64_2 (int __fd, const char *__path, int __oflag); +#if IS_IN (rtld) +extern __typeof (__open) __open attribute_hidden; +extern __typeof (__fcntl) __fcntl attribute_hidden; +#endif + /* Flag determining whether the *at system calls are available. */ extern int __have_atfcts attribute_hidden;