From patchwork Wed Feb 21 23:24:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 25990 Received: (qmail 94273 invoked by alias); 21 Feb 2018 23:24: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 88910 invoked by uid 89); 21 Feb 2018 23:24:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=arising X-HELO: relay1.mentorg.com Date: Wed, 21 Feb 2018 23:24:14 +0000 From: Joseph Myers To: Subject: Use libc_hidden_* for atoi (bug 15105) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for atoi by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os - but other such failures remain so the bug can't yet be closed - and that the testsuite continues to pass without -Os). 2018-02-21 Joseph Myers [BZ #15105] * stdlib/atoi.c (atoi): Use libc_hidden_def. * include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto. diff --git a/include/stdlib.h b/include/stdlib.h index 5974fb3..114e12d 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -210,6 +210,8 @@ libc_hidden_proto (strtoll) libc_hidden_proto (strtoul) libc_hidden_proto (strtoull) +libc_hidden_proto (atoi) + extern float __strtof_nan (const char *, char **, char); extern double __strtod_nan (const char *, char **, char); extern long double __strtold_nan (const char *, char **, char); diff --git a/stdlib/atoi.c b/stdlib/atoi.c index a6c3f1d..c428584 100644 --- a/stdlib/atoi.c +++ b/stdlib/atoi.c @@ -26,3 +26,4 @@ atoi (const char *nptr) { return (int) strtol (nptr, (char **) NULL, 10); } +libc_hidden_def (atoi)