about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 15:14:17 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 15:14:33 -0700
commit44af8a32c341672b5160fdc2839767e9a837ad26 (patch)
tree6c5198134eb5dd72e346e75c792bd346b6426c48 /include
parent783cd767af5f3746b639f76b1de5e0e3c3d64683 (diff)
downloadglibc-44af8a32c341672b5160fdc2839767e9a837ad26.tar.gz
glibc-44af8a32c341672b5160fdc2839767e9a837ad26.tar.xz
glibc-44af8a32c341672b5160fdc2839767e9a837ad26.zip
Mark internal wchar functions with attribute_hidden [BZ #18822]
Mark internal wchar functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/wchar.h (__wcsnlen): Add attribute_hidden.
	(__wcscat): Likewise.
	(__btowc): Likewise.
	(__wcrtomb): Likewise.
	(__mbsrtowcs): Likewise.
	(__wcsrtombs): Likewise.
	(__mbsnrtowcs): Likewise.
	(__wcsnrtombs): Likewise.
	(__wcsncpy): Likewise.
	(__wcpncpy): Likewise.
	(__wmemcpy): Likewise.
	(__wmempcpy): Likewise.
	(__wmemmove): Likewise.
	(__wcschrnul): Likewise.
	(__vfwscanf): Likewise.
	(__vswprintf): Likewise.
	(__fwprintf): Likewise.
	(__vfwprintf): Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/wchar.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/include/wchar.h b/include/wchar.h
index eb472daefb..24b2eaa5f9 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -152,9 +152,10 @@ extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
      __attribute_pure__;
 extern size_t __wcslen (const wchar_t *__s) __attribute_pure__;
 extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen)
-     __attribute_pure__;
-extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
-extern wint_t __btowc (int __c);
+     attribute_hidden __attribute_pure__;
+extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src)
+     attribute_hidden;
+extern wint_t __btowc (int __c) attribute_hidden;
 extern int __mbsinit (const __mbstate_t *__ps);
 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
 			 const char *__restrict __s, size_t __n,
@@ -162,34 +163,39 @@ extern size_t __mbrtowc (wchar_t *__restrict __pwc,
 libc_hidden_proto (__mbrtowc)
 libc_hidden_proto (__mbrlen)
 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
-			 __mbstate_t *__restrict __ps);
+			 __mbstate_t *__restrict __ps) attribute_hidden;
 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
 			   const char **__restrict __src,
-			   size_t __len, __mbstate_t *__restrict __ps);
+			   size_t __len, __mbstate_t *__restrict __ps)
+     attribute_hidden;
 extern size_t __wcsrtombs (char *__restrict __dst,
 			   const wchar_t **__restrict __src,
-			   size_t __len, __mbstate_t *__restrict __ps);
+			   size_t __len, __mbstate_t *__restrict __ps)
+     attribute_hidden;
 extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
 			    const char **__restrict __src, size_t __nmc,
-			    size_t __len, __mbstate_t *__restrict __ps);
+			    size_t __len, __mbstate_t *__restrict __ps)
+     attribute_hidden;
 extern size_t __wcsnrtombs (char *__restrict __dst,
 			    const wchar_t **__restrict __src,
 			    size_t __nwc, size_t __len,
-			    __mbstate_t *__restrict __ps);
+			    __mbstate_t *__restrict __ps)
+     attribute_hidden;
 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
-			   const wchar_t *__restrict __src, size_t __n);
+			   const wchar_t *__restrict __src, size_t __n)
+     attribute_hidden;
 extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src);
 extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src,
-			   size_t __n);
+			   size_t __n) attribute_hidden;
 extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2,
-			   size_t __n);
+			   size_t __n) attribute_hidden;
 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
 			    const wchar_t *__restrict __s2,
-			    size_t __n);
+			    size_t __n) attribute_hidden;
 extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2,
-			    size_t __n);
+			    size_t __n) attribute_hidden;
 extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
-     __attribute_pure__;
+     attribute_hidden __attribute_pure__;
 
 extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
 			       size_t __ns) __THROW;
@@ -197,17 +203,21 @@ extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
 extern int __vfwscanf (__FILE *__restrict __s,
 		       const wchar_t *__restrict __format,
 		       __gnuc_va_list __arg)
+     attribute_hidden
      /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
 			const wchar_t *__restrict __format,
 			__gnuc_va_list __arg)
+     attribute_hidden
      /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
 extern int __fwprintf (__FILE *__restrict __s,
 		       const wchar_t *__restrict __format, ...)
+     attribute_hidden
      /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
 extern int __vfwprintf (__FILE *__restrict __s,
 			const wchar_t *__restrict __format,
 			__gnuc_va_list __arg)
+     attribute_hidden
      /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
 extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
 			    const wchar_t *__restrict __format,