public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Use libc_hidden_* for atoi (bug 15105)
@ 2018-02-22  0:23 Joseph Myers
  2018-02-26 18:09 ` Ping " Joseph Myers
  2018-02-26 18:13 ` H.J. Lu
  0 siblings, 2 replies; 3+ messages in thread
From: Joseph Myers @ 2018-02-22  0:23 UTC (permalink / raw)
  To: libc-alpha

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  <joseph@codesourcery.com>

	[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)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Ping Re: Use libc_hidden_* for atoi (bug 15105)
  2018-02-22  0:23 Use libc_hidden_* for atoi (bug 15105) Joseph Myers
@ 2018-02-26 18:09 ` Joseph Myers
  2018-02-26 18:13 ` H.J. Lu
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Myers @ 2018-02-26 18:09 UTC (permalink / raw)
  To: libc-alpha

Ping.  This patch 
<https://sourceware.org/ml/libc-alpha/2018-02/msg00602.html> is pending 
review.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Use libc_hidden_* for atoi (bug 15105)
  2018-02-22  0:23 Use libc_hidden_* for atoi (bug 15105) Joseph Myers
  2018-02-26 18:09 ` Ping " Joseph Myers
@ 2018-02-26 18:13 ` H.J. Lu
  1 sibling, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2018-02-26 18:13 UTC (permalink / raw)
  To: Joseph Myers; +Cc: GNU C Library

On Wed, Feb 21, 2018 at 3:24 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> 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  <joseph@codesourcery.com>
>
>         [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)
>

LGTM.

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-26 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22  0:23 Use libc_hidden_* for atoi (bug 15105) Joseph Myers
2018-02-26 18:09 ` Ping " Joseph Myers
2018-02-26 18:13 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).