about summary refs log tree commit diff
path: root/sysdeps/i386/i686/multiarch
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-04-20 14:07:52 +0200
committerFrédéric Bérat <fberat@redhat.com>2023-07-05 16:59:48 +0200
commitdd8486ffc195f5fe150b2d3724c7712686cfddb0 (patch)
tree8c6a24a94d1884b92f9b48536b39847110a23564 /sysdeps/i386/i686/multiarch
parentba96ff24b253d0321508b8b462103bbaa2975bb5 (diff)
downloadglibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.gz
glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.xz
glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.zip
string: Ensure *_chk routines have their hidden builtin definition available
If libc_hidden_builtin_{def,proto} isn't properly set for *_chk routines,
there are unwanted PLT entries in libc.so.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/i386/i686/multiarch')
-rw-r--r--sysdeps/i386/i686/multiarch/memcpy_chk.c4
-rw-r--r--sysdeps/i386/i686/multiarch/memmove_chk.c4
-rw-r--r--sysdeps/i386/i686/multiarch/mempcpy_chk.c4
-rw-r--r--sysdeps/i386/i686/multiarch/memset_chk.c5
4 files changed, 16 insertions, 1 deletions
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