This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/pr18822 created. glibc-2.26.9000-817-g5b9a7b3
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 25 Nov 2017 14:49:46 -0000
- Subject: GNU C Library master sources branch hjl/pr18822 created. glibc-2.26.9000-817-g5b9a7b3
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr18822 has been created
at 5b9a7b35871fc94f42a9e0f1a034423b48d3a4e7 (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b9a7b35871fc94f42a9e0f1a034423b48d3a4e7
commit 5b9a7b35871fc94f42a9e0f1a034423b48d3a4e7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Nov 24 15:58:04 2017 -0800
Add wcharP.h to hide internal wchar functions [BZ #18822]
For some targets, like i386 and s390, internal IFUNC functions must be
called via PLT with a special register. Add <wcharP.h> to allow targets,
which don't need a special register to call internal IFUNC functions via
PLT or have internal non-IFUNC wchar functions, to allow direct access to
internal wchar functions within libc.so and libc.a without using GOT nor
PLT.
Tested on i686 and x86-64. It removed 11 PLT relocations on i686 and
29 PLT relocations on x86-64.
[BZ #18822]
* include/wchar.h: Include <wcharP.h>.
* sysdeps/generic/wcharP.h: New file.
* sysdeps/i386/wcharP.h: Likewise.
* sysdeps/x86_64/wcharP.h: Likewise.
diff --git a/include/wchar.h b/include/wchar.h
index 1db0ac8..4160322 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -2,6 +2,7 @@
# include <wcsmbs/wchar.h>
# ifndef _ISOMAC
+#include <wcharP.h>
#include <bits/floatn.h>
extern __typeof (wcscasecmp_l) __wcscasecmp_l;
diff --git a/sysdeps/generic/wcharP.h b/sysdeps/generic/wcharP.h
new file mode 100644
index 0000000..1a37283
--- /dev/null
+++ b/sysdeps/generic/wcharP.h
@@ -0,0 +1,18 @@
+/* Internal prototrypes for multibyte and wide character functions.
+ Generic version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
diff --git a/sysdeps/i386/wcharP.h b/sysdeps/i386/wcharP.h
new file mode 100644
index 0000000..deac12e
--- /dev/null
+++ b/sysdeps/i386/wcharP.h
@@ -0,0 +1,24 @@
+/* Internal prototrypes for multibyte and wide character functions.
+ i386 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+extern __typeof (wcpncpy) __wcpncpy attribute_hidden;
+extern __typeof (wcscat) __wcscat attribute_hidden __attribute_pure__;
+extern __typeof (wcschrnul) __wcschrnul attribute_hidden __attribute_pure__;
+extern __typeof (wcsncpy) __wcsncpy attribute_hidden;
+extern __typeof (wcsnlen) __wcsnlen attribute_hidden __attribute_pure__;
diff --git a/sysdeps/x86_64/wcharP.h b/sysdeps/x86_64/wcharP.h
new file mode 100644
index 0000000..bd6272d
--- /dev/null
+++ b/sysdeps/x86_64/wcharP.h
@@ -0,0 +1,25 @@
+/* Internal prototrypes for multibyte and wide character functions.
+ x86-64 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+extern __typeof (wcpncpy) __wcpncpy attribute_hidden;
+extern __typeof (wcscat) __wcscat attribute_hidden __attribute_pure__;
+extern __typeof (wcschrnul) __wcschrnul attribute_hidden __attribute_pure__;
+extern __typeof (wcsncpy) __wcsncpy attribute_hidden;
+extern __typeof (wcslen) __wcslen attribute_hidden __attribute_pure__;
+extern __typeof (wcsnlen) __wcsnlen attribute_hidden __attribute_pure__;
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources