about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-02-26 18:17:47 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-02-26 18:17:47 +0000
commit20602c72fa54bc0923314820ec8148186096bf3b (patch)
tree1f3f75293d510a9deac8cc7d4c29e70d34011804
parentf5f473a9d0e8fdbede858fa1ef0d01d12142367b (diff)
downloadglibc-20602c72fa54bc0923314820ec8148186096bf3b.tar.gz
glibc-20602c72fa54bc0923314820ec8148186096bf3b.tar.xz
glibc-20602c72fa54bc0923314820ec8148186096bf3b.zip
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.
-rw-r--r--ChangeLog6
-rw-r--r--include/stdlib.h2
-rw-r--r--stdlib/atoi.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index db0b451a20..f7e7204c4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #15105]
+	* stdlib/atoi.c (atoi): Use libc_hidden_def.
+	* include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto.
+
 2018-02-26  Dmitry V. Levin  <ldv@altlinux.org>
 
 	[BZ #22433]
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)