aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386
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
parentba96ff24b253d0321508b8b462103bbaa2975bb5 (diff)
downloadglibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar
glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.gz
glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.bz2
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')
-rw-r--r--sysdeps/i386/i586/memcpy.S1
-rw-r--r--sysdeps/i386/i586/memset.S1
-rw-r--r--sysdeps/i386/i686/memcpy.S1
-rw-r--r--sysdeps/i386/i686/memmove.S1
-rw-r--r--sysdeps/i386/i686/mempcpy.S1
-rw-r--r--sysdeps/i386/i686/memset.S1
-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
-rw-r--r--sysdeps/i386/memcpy_chk.S1
-rw-r--r--sysdeps/i386/memmove_chk.S1
-rw-r--r--sysdeps/i386/mempcpy_chk.S1
-rw-r--r--sysdeps/i386/memset_chk.S1
14 files changed, 26 insertions, 1 deletions
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