From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id A27C63858004; Fri, 19 Nov 2021 21:22:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A27C63858004 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for atoi (bug 15105). X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: 98fa83a2a8aa784388182af5a530072375713aed X-Git-Newrev: c0a436544259c7aef8871c29731a48dc715039db Message-Id: <20211119212207.A27C63858004@sourceware.org> Date: Fri, 19 Nov 2021 21:22:07 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2021 21:22:07 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c0a436544259c7aef8871c29731a48dc715039db commit c0a436544259c7aef8871c29731a48dc715039db Author: Joseph Myers Date: Mon Feb 26 18:17:47 2018 +0000 Use libc_hidden_* for atoi (bug 15105). 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, and that the testsuite continues to pass without -Os). [BZ #15105] * stdlib/atoi.c (atoi): Use libc_hidden_def. * include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto. (cherry picked from commit 20602c72fa54bc0923314820ec8148186096bf3b) Diff: --- include/stdlib.h | 2 ++ stdlib/atoi.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/stdlib.h b/include/stdlib.h index 5974fb3d24..114e12d255 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 a6c3f1d547..c42858494f 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)