[{"id":1778066,"web_url":"http://patchwork.ozlabs.org/comment/1778066/","msgid":"<CAMe9rOri9BFXn5aKSE47fbmBhqcu4m1p8eD_vrVaz-KapC=wmA@mail.gmail.com>","list_archive_url":null,"date":"2017-10-01T21:21:21","subject":"Re: [PATCH 02/58] Mark 3 *_internal functions with attribute_hidden\n\t[BZ #18822]","submitter":{"id":4387,"url":"http://patchwork.ozlabs.org/api/people/4387/","name":"H.J. Lu","email":"hjl.tools@gmail.com"},"content":"On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:\n> Mark __ptsname_internal, __mktime_internal and __fopen_internal with\n> attribute_hidden to allow direct access to them within libc.so and\n> libc.a without using GOT nor PLT.\n>\n> \t[BZ #18822]\n> \t* include/stdlib.h (__ptsname_internal): Add attribute_hidden.\n> \t* include/time.h (__mktime_internal): Likewise.\n> \t* libio/iolibio.h (__fopen_internal): Likewise.\n> ---\n>  include/stdlib.h | 2 +-\n>  include/time.h   | 2 +-\n>  libio/iolibio.h  | 3 ++-\n>  3 files changed, 4 insertions(+), 3 deletions(-)\n>\n> diff --git a/include/stdlib.h b/include/stdlib.h\n> index c4a6e6f737..2274790a2e 100644\n> --- a/include/stdlib.h\n> +++ b/include/stdlib.h\n> @@ -78,7 +78,7 @@ extern char *__realpath (const char *__name, char\n> *__resolved);\n>  extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);\n>  # ifndef _ISOMAC\n>  extern int __ptsname_internal (int fd, char *buf, size_t buflen,\n> -\t\t\t       struct stat64 *stp);\n> +\t\t\t       struct stat64 *stp) attribute_hidden;\n>  # endif\n>  extern int __getpt (void);\n>  extern int __posix_openpt (int __oflag);\n> diff --git a/include/time.h b/include/time.h\n> index 9fb0e329a3..e8c07bbfea 100644\n> --- a/include/time.h\n> +++ b/include/time.h\n> @@ -54,7 +54,7 @@ extern void __tz_compute (time_t timer, struct tm *tm, int\n> use_localtime)\n>  extern time_t __mktime_internal (struct tm *__tp,\n>  \t\t\t\t struct tm *(*__func) (const time_t *,\n>  \t\t\t\t\t\t       struct tm *),\n> -\t\t\t\t time_t *__offset);\n> +\t\t\t\t time_t *__offset) attribute_hidden;\n>  extern struct tm *__localtime_r (const time_t *__timer,\n>  \t\t\t\t struct tm *__tp) attribute_hidden;\n>\n> diff --git a/libio/iolibio.h b/libio/iolibio.h\n> index f215fcef01..754d8b0650 100644\n> --- a/libio/iolibio.h\n> +++ b/libio/iolibio.h\n> @@ -23,7 +23,8 @@ extern _IO_FILE *_IO_fopen (const char*, const char*);\n>  extern _IO_FILE *_IO_old_fopen (const char*, const char*);\n>  extern _IO_FILE *_IO_new_fopen (const char*, const char*);\n>  extern _IO_FILE *_IO_fopen64 (const char*, const char*);\n> -extern _IO_FILE *__fopen_internal (const char*, const char*, int);\n> +extern _IO_FILE *__fopen_internal (const char*, const char*, int)\n> +\tattribute_hidden;\n>  extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW;\n>  extern int _IO_fprintf (_IO_FILE*, const char*, ...);\n>  extern int _IO_fputs (const char*, _IO_FILE*);\n> --\n> 2.13.5\n>\n>\n\nTested with build-many-glibcs.py.  I am checking it in.","headers":{"Return-Path":"<libc-alpha-return-85193-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-85193-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"iFbWzDcn\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y4ysV576Tz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 08:21:34 +1100 (AEDT)","(qmail 44976 invoked by alias); 1 Oct 2017 21:21:25 -0000","(qmail 44901 invoked by uid 89); 1 Oct 2017 21:21:25 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:content-type; q=dns; s=default; b=rwFYWCo\n\tsZoHgGYlWyyLOZ/xMSPnjhx7TXnA1hN0JTWEm7AQnaN31BF7NuBrY92RpjdWzs11\n\tSlbZfriDFfwW+2/6Ev/o91N20pvZrH9fMTJWiXuw/QQP5N1zD8m3BjvRiB/q/X0O\n\tEwwi+KYdElrIpnVWjglKgnWKM9pGYoIU8d2c=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:content-type; s=default; bh=wCJj5yMz3fAK8\n\tsTtaC1/4ymiyIA=; b=iFbWzDcnOXMnP/di24xJbrw5pFAPOszF6M46Hlue/Ixr8\n\tnu41ZTvZqwyCeMHvxqjHCHFA08EyujwEunPwIaKgZ0fhI5i/l3Jm0gxnlws04Bt2\n\tHDMLLDXPIbvSFpCKA4s2jv5nLEpoQqu0IDvhIYexV40qK/R1LGz+MvNa0+XwgU=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-25.0 required=5.0 tests=AWL, BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2,\n\tGIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2\n\tspammy=HX-Google-Smtp-Source:AOwi7QD","X-HELO":"mail-oi0-f66.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to;\n\tbh=O6w0IBUQ1F7/x3FKF+pBNdCAkhoyio7fmTqetnLkEmQ=;\n\tb=iCN8cioDhUOmJ0KSFky3bNMt7j0kgc8WuYXIRjrhZKsceyolX7FutPPS+qBfylfvxr\n\tjkJzlkB7d2UiX2vGlc5i+vFmn1kpT9MdcR8iUd8cUgNOlQjTMiIfVE7HgfWNEcAXS5vJ\n\tqqTae4Ze1816/RmxPa5ovz9QeXmA39mKN/iFSBqyDDLWJ/yBH06DvI0Y9oPSpJDj4/7+\n\tTCZ/kgeSPuVrPfY6zBjY1aYr0E6t2rIDDFGaNaUcbQjKfWi9a+ekoxMfMa+5x5BgxFwQ\n\tJekiKsdX+XSQOLCTFDrIr1xWAL+1g1Aj4n3CdLkwuwwT5bNTEB8brbgc/FjE0a+Iz80L\n\tcmPg==","X-Gm-Message-State":"AMCzsaWMoDLRyQMqEK6ZPrM1o4f9XCkoCVYG6LVza3NIWg/VMbUMlSSr\n\t9FRVfSQ3nHmPkeu8covonvktL6gJnZ+w6vlmfrg=","X-Google-Smtp-Source":"AOwi7QD+qD1WPKhU3C1BhUTvqpsr9mkP/ni2NW3Tdi2gNNWHcpxb6BC9f7aaqy1kz1EWtd5ICXlxfhy55kMboK99PIo=","X-Received":"by 10.202.89.194 with SMTP id n185mr5920063oib.224.1506892882081;\n\tSun, 01 Oct 2017 14:21:22 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170901180029.9527-3-hjl.tools@gmail.com>","References":"<20170901180029.9527-1-hjl.tools@gmail.com>\n\t<20170901180029.9527-3-hjl.tools@gmail.com>","From":"\"H.J. Lu\" <hjl.tools@gmail.com>","Date":"Sun, 1 Oct 2017 14:21:21 -0700","Message-ID":"<CAMe9rOri9BFXn5aKSE47fbmBhqcu4m1p8eD_vrVaz-KapC=wmA@mail.gmail.com>","Subject":"Re: [PATCH 02/58] Mark 3 *_internal functions with attribute_hidden\n\t[BZ #18822]","To":"libc-alpha@sourceware.org","Content-Type":"text/plain; charset=\"UTF-8\""}}]