From patchwork Fri Sep 1 17:59:43 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: 808874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-84067-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="sC1OzSzB"; dkim-atps=neutral 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 3xkRwS49Ptz9s3w for ; Sat, 2 Sep 2017 04:04:56 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=gkxrms/S8mq7Adv0fOv+irPcGRbfh4F ub3Ip6pwcMIjkzrm1jdqW1XXtCRhTKXa2mcd5sQ+KcK8TiyLKG85JZptiQlQQk61 vCs/Bp0nB9ncZDTpck5WneyKihIGKVDxV4M15kUP56SuFJyF41LJz3Kh0aU2dDJ8 RNZhzZs7l1xQ= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=elAPILc1puGj4P8876B+AvYo5Ok=; b=sC1Oz SzBRNijLgytOHfkz15xgNZeBVGvXd7XxPy7x0hVZ+5bt7hLp6vYd6tPax02j8jMx 5vgD2QIw8F9ISbi4gAovJBzzrLnt46YWU391w/5VnP/0sKWd2b2MtTHvEMrOi6t5 AjiaD3WOgIOZdrDSES2lB8F3Eumi5OXmpNRaUQ= Received: (qmail 86268 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-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 86180 invoked by uid 89); 1 Sep 2017 18:00:55 -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 12/58] Mark internal time functions with attribute_hidden [BZ #18822] Date: Fri, 1 Sep 2017 10:59:43 -0700 Message-Id: <20170901180029.9527-13-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Mark internal time functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/time.h (__tzstring): Add attribute_hidden. (__tzfile_read): Likewise. (__tzfile_compute): Likewise. (__tzfile_default): Likewise. (__tzset_parse_tz): Likewise. (__offtime): Likewise. (__asctime_r): Likewise. (__tzset): Likewise. (__tz_convert): Likewise. (__getdate_r): Likewise. (__getclktck): Likewise. --- include/time.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/include/time.h b/include/time.h index e8c07bbfea..aab26d7768 100644 --- a/include/time.h +++ b/include/time.h @@ -33,18 +33,19 @@ extern const unsigned short int __mon_yday[2][13] attribute_hidden; extern struct tm _tmbuf attribute_hidden; /* Defined in tzset.c. */ -extern char *__tzstring (const char *string); +extern char *__tzstring (const char *string) attribute_hidden; extern int __use_tzfile attribute_hidden; extern void __tzfile_read (const char *file, size_t extra, - char **extrap); + char **extrap) attribute_hidden; extern void __tzfile_compute (time_t timer, int use_localtime, long int *leap_correct, int *leap_hit, - struct tm *tp); + struct tm *tp) attribute_hidden; extern void __tzfile_default (const char *std, const char *dst, - long int stdoff, long int dstoff); -extern void __tzset_parse_tz (const char *tz); + long int stdoff, long int dstoff) + attribute_hidden; +extern void __tzset_parse_tz (const char *tz) attribute_hidden; extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) __THROW attribute_hidden; @@ -68,22 +69,25 @@ libc_hidden_proto (__gmtime_r) Return nonzero if successful. */ extern int __offtime (const time_t *__timer, long int __offset, - struct tm *__tp); + struct tm *__tp) attribute_hidden; -extern char *__asctime_r (const struct tm *__tp, char *__buf); -extern void __tzset (void); +extern char *__asctime_r (const struct tm *__tp, char *__buf) + attribute_hidden; +extern void __tzset (void) attribute_hidden; /* Prototype for the internal function to get information based on TZ. */ -extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp); +extern struct tm *__tz_convert (const time_t *timer, int use_localtime, + struct tm *tp) attribute_hidden; extern int __nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); hidden_proto (__nanosleep) -extern int __getdate_r (const char *__string, struct tm *__resbufp); +extern int __getdate_r (const char *__string, struct tm *__resbufp) + attribute_hidden; /* Determine CLK_TCK value. */ -extern int __getclktck (void); +extern int __getclktck (void) attribute_hidden; /* strptime support. */