summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-06-07 11:06:50 +0200
committerFrédéric Bérat <fberat@redhat.com>2023-07-05 16:59:48 +0200
commit64f9857507f6dbf9715350b75e83b465be9b8f03 (patch)
treeb176a051eb3b8de0c0969766edc8dc1d889946d4 /sysdeps
parenteea000f6e69a829425fae25a7c2519f5c79551de (diff)
downloadglibc-64f9857507f6dbf9715350b75e83b465be9b8f03.tar.gz
glibc-64f9857507f6dbf9715350b75e83b465be9b8f03.tar.xz
glibc-64f9857507f6dbf9715350b75e83b465be9b8f03.zip
wchar: Avoid PLT entries with _FORTIFY_SOURCE
The change is meant to avoid unwanted PLT entries for the wmemset and
wcrtomb routines when _FORTIFY_SOURCE is set.

On top of that, ensure that *_chk routines have their hidden builtin
definitions available.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/x86_64/multiarch/wmemset_chk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/wmemset_chk.c b/sysdeps/x86_64/multiarch/wmemset_chk.c
index ac93a1f376..00edf44918 100644
--- a/sysdeps/x86_64/multiarch/wmemset_chk.c
+++ b/sysdeps/x86_64/multiarch/wmemset_chk.c
@@ -28,4 +28,8 @@
 
 libc_ifunc_redirected (__redirect_wmemset_chk, __wmemset_chk,
 		       IFUNC_SELECTOR ());
+# ifdef SHARED
+__hidden_ver1 (__wmemset_chk, __GI___wmemset_chk, __redirect_wmemset_chk)
+  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__wmemset_chk);
+# endif
 #endif