From 64f9857507f6dbf9715350b75e83b465be9b8f03 Mon Sep 17 00:00:00 2001 From: Frédéric Bérat Date: Wed, 7 Jun 2023 11:06:50 +0200 Subject: 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 --- sysdeps/x86_64/multiarch/wmemset_chk.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sysdeps/x86_64/multiarch') 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 -- cgit 1.4.1