diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-04-20 14:07:52 +0200 |
---|---|---|
committer | Frédéric Bérat <fberat@redhat.com> | 2023-07-05 16:59:48 +0200 |
commit | dd8486ffc195f5fe150b2d3724c7712686cfddb0 (patch) | |
tree | 8c6a24a94d1884b92f9b48536b39847110a23564 /sysdeps/x86_64 | |
parent | ba96ff24b253d0321508b8b462103bbaa2975bb5 (diff) | |
download | glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.zip glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.gz glibc-dd8486ffc195f5fe150b2d3724c7712686cfddb0.tar.bz2 |
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/x86_64')
-rw-r--r-- | sysdeps/x86_64/memcpy_chk.S | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/memmove_chk.S | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/mempcpy_chk.S | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/memset_chk.S | 1 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/memcpy_chk.c | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/memmove_chk.c | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/mempcpy_chk.c | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/memset_chk.c | 4 |
8 files changed, 20 insertions, 0 deletions
diff --git a/sysdeps/x86_64/memcpy_chk.S b/sysdeps/x86_64/memcpy_chk.S index 25cbeb3..43843a7 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 165d42c..37e2c30 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 b60ee4f..facdac5 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 ed53b89..c927884 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 5ac5cb1..ec945dc 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 28161d3..55c7601 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 36c81ae..83569cf 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 d81147a..1a75038 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 |