about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-10-15 14:25:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-10-15 14:26:00 -0700
commitf84114688abe316b6a736302a7c13f4883d41f13 (patch)
tree23a17c5bd2c4c8f9ce6ea0ec30f452cc0f86dc73 /include
parentf3fc94c04f72e492f55be4349c6df2a910762b70 (diff)
downloadglibc-f84114688abe316b6a736302a7c13f4883d41f13.tar.gz
glibc-f84114688abe316b6a736302a7c13f4883d41f13.tar.xz
glibc-f84114688abe316b6a736302a7c13f4883d41f13.zip
Mark ld.so internel string functions hidden
Since ld.so internel string functions are only used internally in
ld.so, they can be made hidden.

	[BZ #19122]
	* include/string.h [IS_IN (rtld)] (__stpcpy): Add
	attribute_hidden.
	[IS_IN (rtld)] (__strdup): Likewise.
	[IS_IN (rtld)] (__strerror_r): Likewise.
	[IS_IN (rtld)] (__strsep_g): Likewise.
	[IS_IN (rtld)] (memchr): Likewise.
	[IS_IN (rtld)] (memcmp): Likewise.
	[IS_IN (rtld)] (memcpy): Likewise.
	[IS_IN (rtld)] (memmove): Likewise.
	[IS_IN (rtld)] (memset): Likewise.
	[IS_IN (rtld)] (rawmemchr): Likewise.
	[IS_IN (rtld)] (stpcpy): Likewise.
	[IS_IN (rtld)] (strchr): Likewise.
	[IS_IN (rtld)] (strcmp): Likewise.
	[IS_IN (rtld)] (strlen): Likewise.
	[IS_IN (rtld)] (strnlen): Likewise.
	[IS_IN (rtld)] (strsep): Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/string.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index c57671ea63..a684fd9624 100644
--- a/include/string.h
+++ b/include/string.h
@@ -118,6 +118,26 @@ libc_hidden_builtin_proto (strspn)
 libc_hidden_builtin_proto (strstr)
 libc_hidden_builtin_proto (ffs)
 
+#if IS_IN (rtld)
+extern __typeof (__stpcpy) __stpcpy attribute_hidden;
+extern __typeof (__strdup) __strdup attribute_hidden;
+extern __typeof (__strerror_r) __strerror_r attribute_hidden;
+extern __typeof (__strsep_g) __strsep_g attribute_hidden;
+
+extern __typeof (memchr) memchr attribute_hidden;
+extern __typeof (memcmp) memcmp attribute_hidden;
+extern __typeof (memcpy) memcpy attribute_hidden;
+extern __typeof (memmove) memmove attribute_hidden;
+extern __typeof (memset) memset attribute_hidden;
+extern __typeof (rawmemchr) rawmemchr attribute_hidden;
+extern __typeof (stpcpy) stpcpy attribute_hidden;
+extern __typeof (strchr) strchr attribute_hidden;
+extern __typeof (strcmp) strcmp attribute_hidden;
+extern __typeof (strlen) strlen attribute_hidden;
+extern __typeof (strnlen) strnlen attribute_hidden;
+extern __typeof (strsep) strsep attribute_hidden;
+#endif
+
 #if (!IS_IN (libc) || !defined SHARED) \
   && !defined NO_MEMPCPY_STPCPY_REDIRECT
 /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call