From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bisque.elm.relay.mailchannels.net (bisque.elm.relay.mailchannels.net [23.83.212.18]) by sourceware.org (Postfix) with ESMTPS id 65C0E3870C2B for ; Fri, 30 Jun 2023 15:06:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 65C0E3870C2B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 08346341608; Fri, 30 Jun 2023 15:06:51 +0000 (UTC) Received: from pdx1-sub0-mail-a286.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3CCDE341474; Fri, 30 Jun 2023 15:06:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688137609; a=rsa-sha256; cv=none; b=qs5MGv9QvvfvbnVbWOTJnXF8+g6CJhqEmGJXxQSp4o68ExtS9OYd3u/IEEWvr6XIseX3Jw Ookcbq4K47sILJP3kL8s8e3X+uqrLcWTSMDXr7Y6yyHeQjYM78dh3jrsa5ijjH0fpOwjR0 idz2aqDJXrGEVnsiBFX8yE53I1KwuirscWu8CtpOtLMfDz9f3Lon7VaI/FntFo6F9y4eoG pKtk6N44YoYn6Gf2eMTBPkLJRHgdOi86AT7x4a6RfTvCdakyrkrkVQsoktbXH9eBvKCUaY byNBOYom3o7X8EM8tERKIl6/nsYP83qUutV5k0KUIpSeb/+Jhuh1ktLeHjm8Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688137609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=emRp/bGTvJHftnO98O89sRIlHeHaR4Jh+Msav/ord4g=; b=IhDfnACY1m7EzgZ2aV1YUemvetP01gUdeC+5NWHw2oMmqnB8ubGtE5l2V5d/nOGtCTqKrq s8CfW5tnQGFi6dMggtUZhIH5gT/I15JL7X9yUnXS/NIO8ZLkSzzYKsee3vL8VADOvVxrE6 AUciZsH8hHNjSsVYNfVDdsO+0itRlqFCVRWICRvwDX2DNoHzIm7YKNWcoiiRQt3W55tBp+ GvM2VFto+sZeo8xr2DfD1LxcJDOyR016XecNv/9ihb0IWdGF1XKdpCsCQ8SUL76w/aWfkV j+1A63nTYoUiPP2xeo2MxATR7txoGGMu7ey3v7Hzi7Yq/Leey21/Cj4mdFUUvw== ARC-Authentication-Results: i=1; rspamd-9fcc56855-bx8pc; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Wipe-Left: 76d4308647eedeee_1688137610734_1031628740 X-MC-Loop-Signature: 1688137610734:1022948475 X-MC-Ingress-Time: 1688137610733 Received: from pdx1-sub0-mail-a286.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.217.230 (trex/6.9.1); Fri, 30 Jun 2023 15:06:50 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-09-174-91-45-44.dsl.bell.ca [174.91.45.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a286.dreamhost.com (Postfix) with ESMTPSA id 4QszDm5h2pz7M; Fri, 30 Jun 2023 08:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1688137609; bh=emRp/bGTvJHftnO98O89sRIlHeHaR4Jh+Msav/ord4g=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=vIUt45/loe/CUSjNptmWZSI9+iKFK1KjCNJPoug1dhFWGsZ2AjFIuZFQsU+qOpZZc y4YxrZ0UdUWhhK3fjVVuOlB/IB/577Z3Sbqey9L4eljAG87kggv++6XMcMxxNmpYwq J63VqLQy5uZcA3yZQfB37v3XqOiY005eZ+DgKDVnRN3j7rkDlXmVz2j4D6FwJRgZY1 WJswrXhqNuskG8HsAY9uka316jJM3qx1GtdcwJsXzXtoVmlb5iIksiSplql0fBZ2jI Zd/HWB4+A3CDiCTvjp1giJlbUtllxlnuoFti5D4zBzcDd/qN+ccjvnq8SKBOK0bVp7 NO39GRGImVLOg== Message-ID: <2b5d7821-0dc0-d10d-3efe-f1bbc904fd15@gotplt.org> Date: Fri, 30 Jun 2023 11:06:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 04/16] string: Ensure *_chk routines have their hidden builtin definition available Content-Language: en-US To: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230628084246.778302-1-fberat@redhat.com> <20230628084246.778302-5-fberat@redhat.com> From: Siddhesh Poyarekar In-Reply-To: <20230628084246.778302-5-fberat@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3036.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-06-28 04:42, Frédéric Bérat wrote: > If libc_hidden_builtin_{def,proto} isn't properly set for *_chk routines, > there are unwanted PLT entries in libc.so. > --- LGTM. Reviewed-by: Siddhesh Poyarekar > debug/memcpy_chk.c | 1 + > debug/memmove_chk.c | 1 + > debug/mempcpy_chk.c | 1 + > debug/memset_chk.c | 1 + > debug/stpcpy_chk.c | 1 + > include/string.h | 7 +++++++ > sysdeps/i386/i586/memcpy.S | 1 + > sysdeps/i386/i586/memset.S | 1 + > sysdeps/i386/i686/memcpy.S | 1 + > sysdeps/i386/i686/memmove.S | 1 + > sysdeps/i386/i686/mempcpy.S | 1 + > sysdeps/i386/i686/memset.S | 1 + > sysdeps/i386/i686/multiarch/memcpy_chk.c | 4 ++++ > sysdeps/i386/i686/multiarch/memmove_chk.c | 4 ++++ > sysdeps/i386/i686/multiarch/mempcpy_chk.c | 4 ++++ > sysdeps/i386/i686/multiarch/memset_chk.c | 5 ++++- > sysdeps/i386/memcpy_chk.S | 1 + > sysdeps/i386/memmove_chk.S | 1 + > sysdeps/i386/mempcpy_chk.S | 1 + > sysdeps/i386/memset_chk.S | 1 + > sysdeps/x86_64/memcpy_chk.S | 1 + > sysdeps/x86_64/memmove_chk.S | 1 + > sysdeps/x86_64/mempcpy_chk.S | 1 + > sysdeps/x86_64/memset_chk.S | 1 + > sysdeps/x86_64/multiarch/memcpy_chk.c | 4 ++++ > sysdeps/x86_64/multiarch/memmove_chk.c | 4 ++++ > sysdeps/x86_64/multiarch/mempcpy_chk.c | 4 ++++ > sysdeps/x86_64/multiarch/memset_chk.c | 4 ++++ > 28 files changed, 58 insertions(+), 1 deletion(-) > > diff --git a/debug/memcpy_chk.c b/debug/memcpy_chk.c > index c6dd94c83f..1e4a82c063 100644 > --- a/debug/memcpy_chk.c > +++ b/debug/memcpy_chk.c > @@ -28,3 +28,4 @@ __memcpy_chk (void *dstpp, const void *srcpp, size_t len, size_t dstlen) > > return memcpy (dstpp, srcpp, len); > } > +libc_hidden_builtin_def (__memcpy_chk) > diff --git a/debug/memmove_chk.c b/debug/memmove_chk.c > index 8922a1ba26..b714aa474c 100644 > --- a/debug/memmove_chk.c > +++ b/debug/memmove_chk.c > @@ -32,3 +32,4 @@ MEMMOVE_CHK (void *dest, const void *src, size_t len, size_t destlen) > > return memmove (dest, src, len); > } > +libc_hidden_builtin_def (MEMMOVE_CHK) > diff --git a/debug/mempcpy_chk.c b/debug/mempcpy_chk.c > index 17a46a3b4d..b47b14ee9a 100644 > --- a/debug/mempcpy_chk.c > +++ b/debug/mempcpy_chk.c > @@ -29,3 +29,4 @@ __mempcpy_chk (void *dstpp, const void *srcpp, size_t len, size_t dstlen) > > return __mempcpy (dstpp, srcpp, len); > } > +libc_hidden_builtin_def (__mempcpy_chk) > diff --git a/debug/memset_chk.c b/debug/memset_chk.c > index 4fc0b55d82..93901f5f34 100644 > --- a/debug/memset_chk.c > +++ b/debug/memset_chk.c > @@ -26,3 +26,4 @@ __memset_chk (void *dstpp, int c, size_t len, size_t dstlen) > > return memset (dstpp, c, len); > } > +libc_hidden_builtin_def (__memset_chk) > diff --git a/debug/stpcpy_chk.c b/debug/stpcpy_chk.c > index 230b52bd01..518dd78dca 100644 > --- a/debug/stpcpy_chk.c > +++ b/debug/stpcpy_chk.c > @@ -32,3 +32,4 @@ __stpcpy_chk (char *dest, const char *src, size_t destlen) > > return memcpy (dest, src, len + 1) + len; > } > +libc_hidden_builtin_def (__stpcpy_chk) > diff --git a/include/string.h b/include/string.h > index 0c78ad2539..659530d1aa 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -208,6 +208,13 @@ extern char *__strcat_chk (char *__restrict __dest, > extern char *__strncat_chk (char *__restrict __dest, > const char *__restrict __src, > size_t __len, size_t __destlen) __THROW; > + > +libc_hidden_builtin_proto (__memcpy_chk) > +libc_hidden_builtin_proto (__memmove_chk) > +libc_hidden_builtin_proto (__mempcpy_chk) > +libc_hidden_builtin_proto (__memset_chk) > +libc_hidden_builtin_proto (__stpcpy_chk) > + > #endif > > #endif > diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S > index 58061d5adf..e3405e577c 100644 > --- a/sysdeps/i386/i586/memcpy.S > +++ b/sysdeps/i386/i586/memcpy.S > @@ -32,6 +32,7 @@ ENTRY (__memcpy_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END (__memcpy_chk) > +libc_hidden_builtin_def (__memcpy_chk) > #endif > ENTRY (memcpy) > > diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S > index 413e8ec6a9..f1f0e1a99b 100644 > --- a/sysdeps/i386/i586/memset.S > +++ b/sysdeps/i386/i586/memset.S > @@ -33,6 +33,7 @@ ENTRY (__memset_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END (__memset_chk) > +libc_hidden_builtin_def (__memset_chk) > #endif > ENTRY (memset) > > diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S > index 604d3088f6..9b48ec0ea1 100644 > --- a/sysdeps/i386/i686/memcpy.S > +++ b/sysdeps/i386/i686/memcpy.S > @@ -33,6 +33,7 @@ ENTRY_CHK (__memcpy_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END_CHK (__memcpy_chk) > +libc_hidden_builtin_def (__memcpy_chk) > #endif > ENTRY (memcpy) > > diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S > index cff06c27e5..06fe2a7668 100644 > --- a/sysdeps/i386/i686/memmove.S > +++ b/sysdeps/i386/i686/memmove.S > @@ -35,6 +35,7 @@ ENTRY_CHK (__memmove_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END_CHK (__memmove_chk) > +libc_hidden_builtin_def (__memmove_chk) > #endif > > ENTRY (memmove) > diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S > index af3f2cca08..26f8501e7d 100644 > --- a/sysdeps/i386/i686/mempcpy.S > +++ b/sysdeps/i386/i686/mempcpy.S > @@ -33,6 +33,7 @@ ENTRY_CHK (__mempcpy_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END_CHK (__mempcpy_chk) > +libc_hidden_builtin_def (__mempcpy_chk) > #endif > ENTRY (__mempcpy) > > diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S > index d4891880d7..0b5e671d83 100644 > --- a/sysdeps/i386/i686/memset.S > +++ b/sysdeps/i386/i686/memset.S > @@ -33,6 +33,7 @@ ENTRY_CHK (__memset_chk) > cmpl %eax, 16(%esp) > jb HIDDEN_JUMPTARGET (__chk_fail) > END_CHK (__memset_chk) > +libc_hidden_builtin_def (__memset_chk) > #endif > ENTRY (memset) > > diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.c b/sysdeps/i386/i686/multiarch/memcpy_chk.c > index 5ac5cb1d7a..ec945dc91f 100644 > --- a/sysdeps/i386/i686/multiarch/memcpy_chk.c > +++ b/sysdeps/i386/i686/multiarch/memcpy_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_memcpy_chk, __memcpy_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__memcpy_chk, __GI___memcpy_chk, __redirect_memcpy_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memcpy_chk); > +# endif > #endif > diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.c b/sysdeps/i386/i686/multiarch/memmove_chk.c > index 28161d3c27..55c7601d5d 100644 > --- a/sysdeps/i386/i686/multiarch/memmove_chk.c > +++ b/sysdeps/i386/i686/multiarch/memmove_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_memmove_chk, __memmove_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__memmove_chk, __GI___memmove_chk, __redirect_memmove_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memmove_chk); > +# endif > #endif > diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.c b/sysdeps/i386/i686/multiarch/mempcpy_chk.c > index 36c81ae61a..83569cf9d9 100644 > --- a/sysdeps/i386/i686/multiarch/mempcpy_chk.c > +++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_mempcpy_chk, __mempcpy_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__mempcpy_chk, __GI___mempcpy_chk, __redirect_mempcpy_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__mempcpy_chk); > +# endif > #endif > diff --git a/sysdeps/i386/i686/multiarch/memset_chk.c b/sysdeps/i386/i686/multiarch/memset_chk.c > index cf3e811327..1a7503858d 100644 > --- a/sysdeps/i386/i686/multiarch/memset_chk.c > +++ b/sysdeps/i386/i686/multiarch/memset_chk.c > @@ -28,5 +28,8 @@ > > libc_ifunc_redirected (__redirect_memset_chk, __memset_chk, > IFUNC_SELECTOR ()); > - > +# ifdef SHARED > +__hidden_ver1 (__memset_chk, __GI___memset_chk, __redirect_memset_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memset_chk); > +# endif > #endif > diff --git a/sysdeps/i386/memcpy_chk.S b/sysdeps/i386/memcpy_chk.S > index b5244cc69b..7b12c12aba 100644 > --- a/sysdeps/i386/memcpy_chk.S > +++ b/sysdeps/i386/memcpy_chk.S > @@ -31,4 +31,5 @@ ENTRY (__memcpy_chk) > jb __chk_fail > jmp memcpy > END (__memcpy_chk) > +libc_hidden_builtin_def (__memcpy_chk) > #endif > diff --git a/sysdeps/i386/memmove_chk.S b/sysdeps/i386/memmove_chk.S > index 517d8cb15a..604aea8305 100644 > --- a/sysdeps/i386/memmove_chk.S > +++ b/sysdeps/i386/memmove_chk.S > @@ -30,4 +30,5 @@ ENTRY (__memmove_chk) > jb __chk_fail > jmp memmove > END (__memmove_chk) > +libc_hidden_builtin_def (MEMMOVE_CHK) > #endif > diff --git a/sysdeps/i386/mempcpy_chk.S b/sysdeps/i386/mempcpy_chk.S > index 1e9bf71bfb..276eab1e8a 100644 > --- a/sysdeps/i386/mempcpy_chk.S > +++ b/sysdeps/i386/mempcpy_chk.S > @@ -30,4 +30,5 @@ ENTRY (__mempcpy_chk) > jb __chk_fail > jmp __mempcpy > END (__mempcpy_chk) > +libc_hidden_builtin_def (__mempcpy_chk) > #endif > diff --git a/sysdeps/i386/memset_chk.S b/sysdeps/i386/memset_chk.S > index 0e6060a0a6..a2e9208e1c 100644 > --- a/sysdeps/i386/memset_chk.S > +++ b/sysdeps/i386/memset_chk.S > @@ -30,4 +30,5 @@ ENTRY (__memset_chk) > jb __chk_fail > jmp memset > END (__memset_chk) > +libc_hidden_builtin_def (__memset_chk) > #endif > diff --git a/sysdeps/x86_64/memcpy_chk.S b/sysdeps/x86_64/memcpy_chk.S > index 25cbeb37ee..43843a7abb 100644 > --- a/sysdeps/x86_64/memcpy_chk.S > +++ b/sysdeps/x86_64/memcpy_chk.S > @@ -30,4 +30,5 @@ ENTRY (__memcpy_chk) > jb __chk_fail > jmp memcpy > END (__memcpy_chk) > +libc_hidden_builtin_def (__memcpy_chk) > #endif > diff --git a/sysdeps/x86_64/memmove_chk.S b/sysdeps/x86_64/memmove_chk.S > index 165d42cfa8..37e2c30ba8 100644 > --- a/sysdeps/x86_64/memmove_chk.S > +++ b/sysdeps/x86_64/memmove_chk.S > @@ -30,4 +30,5 @@ ENTRY (__memmove_chk) > jb __chk_fail > jmp memmove > END (__memmove_chk) > +libc_hidden_builtin_def (MEMMOVE_CHK) > #endif > diff --git a/sysdeps/x86_64/mempcpy_chk.S b/sysdeps/x86_64/mempcpy_chk.S > index b60ee4ff08..facdac50d8 100644 > --- a/sysdeps/x86_64/mempcpy_chk.S > +++ b/sysdeps/x86_64/mempcpy_chk.S > @@ -30,4 +30,5 @@ ENTRY (__mempcpy_chk) > jb __chk_fail > jmp __mempcpy > END (__mempcpy_chk) > +libc_hidden_builtin_def (__mempcpy_chk) > #endif > diff --git a/sysdeps/x86_64/memset_chk.S b/sysdeps/x86_64/memset_chk.S > index ed53b8927f..c927884b1a 100644 > --- a/sysdeps/x86_64/memset_chk.S > +++ b/sysdeps/x86_64/memset_chk.S > @@ -30,4 +30,5 @@ ENTRY (__memset_chk) > jb __chk_fail > jmp memset > END (__memset_chk) > +libc_hidden_builtin_def (__memset_chk) > #endif > diff --git a/sysdeps/x86_64/multiarch/memcpy_chk.c b/sysdeps/x86_64/multiarch/memcpy_chk.c > index 5ac5cb1d7a..ec945dc91f 100644 > --- a/sysdeps/x86_64/multiarch/memcpy_chk.c > +++ b/sysdeps/x86_64/multiarch/memcpy_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_memcpy_chk, __memcpy_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__memcpy_chk, __GI___memcpy_chk, __redirect_memcpy_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memcpy_chk); > +# endif > #endif > diff --git a/sysdeps/x86_64/multiarch/memmove_chk.c b/sysdeps/x86_64/multiarch/memmove_chk.c > index 28161d3c27..55c7601d5d 100644 > --- a/sysdeps/x86_64/multiarch/memmove_chk.c > +++ b/sysdeps/x86_64/multiarch/memmove_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_memmove_chk, __memmove_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__memmove_chk, __GI___memmove_chk, __redirect_memmove_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memmove_chk); > +# endif > #endif > diff --git a/sysdeps/x86_64/multiarch/mempcpy_chk.c b/sysdeps/x86_64/multiarch/mempcpy_chk.c > index 36c81ae61a..83569cf9d9 100644 > --- a/sysdeps/x86_64/multiarch/mempcpy_chk.c > +++ b/sysdeps/x86_64/multiarch/mempcpy_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_mempcpy_chk, __mempcpy_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__mempcpy_chk, __GI___mempcpy_chk, __redirect_mempcpy_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__mempcpy_chk); > +# endif > #endif > diff --git a/sysdeps/x86_64/multiarch/memset_chk.c b/sysdeps/x86_64/multiarch/memset_chk.c > index d81147a70c..1a7503858d 100644 > --- a/sysdeps/x86_64/multiarch/memset_chk.c > +++ b/sysdeps/x86_64/multiarch/memset_chk.c > @@ -28,4 +28,8 @@ > > libc_ifunc_redirected (__redirect_memset_chk, __memset_chk, > IFUNC_SELECTOR ()); > +# ifdef SHARED > +__hidden_ver1 (__memset_chk, __GI___memset_chk, __redirect_memset_chk) > + __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memset_chk); > +# endif > #endif