about summary refs log tree commit diff
path: root/debug
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-03 21:16:41 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-03 22:46:48 +0200
commit04bf7d2d8a79bf8d06ca811518688ccda190b376 (patch)
treebda91b114bcd43681c51b711ead69942067408e9 /debug
parentcbf4aa422c82b895ab56ef5e9acda37947ad4184 (diff)
downloadglibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.tar.gz
glibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.tar.xz
glibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.zip
chk: Add and fix hidden builtin definitions for *_chk
Otherwise on gnu-i686 there are unwanted PLT entries in libc.so when
fortification is enabled.

Tested for i686-gnu, x86_64-gnu, i686-linux-gnu and x86_64-linux-gnu
Diffstat (limited to 'debug')
-rw-r--r--debug/longjmp_chk.c1
-rw-r--r--debug/strncpy_chk.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/debug/longjmp_chk.c b/debug/longjmp_chk.c
index 1bc33c5769..c527e22db6 100644
--- a/debug/longjmp_chk.c
+++ b/debug/longjmp_chk.c
@@ -21,3 +21,4 @@
 #define __libc_siglongjmp __longjmp_chk
 
 #include <setjmp/longjmp.c>
+libc_hidden_def (__longjmp_chk)
diff --git a/debug/strncpy_chk.c b/debug/strncpy_chk.c
index cb142b820f..966df2739b 100644
--- a/debug/strncpy_chk.c
+++ b/debug/strncpy_chk.c
@@ -27,3 +27,4 @@ __strncpy_chk (char *s1, const char *s2, size_t n, size_t s1len)
 
   return strncpy (s1, s2, n);
 }
+libc_hidden_builtin_def (__strncpy_chk)