aboutsummaryrefslogtreecommitdiff
path: root/include/setjmp.h
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 /include/setjmp.h
parentcbf4aa422c82b895ab56ef5e9acda37947ad4184 (diff)
downloadglibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.zip
glibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.tar.gz
glibc-04bf7d2d8a79bf8d06ca811518688ccda190b376.tar.bz2
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 'include/setjmp.h')
-rw-r--r--include/setjmp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/setjmp.h b/include/setjmp.h
index 26c6775..d2353be 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -11,6 +11,14 @@ extern void __longjmp (__jmp_buf __env, int __val)
extern void ____longjmp_chk (__jmp_buf __env, int __val)
__attribute__ ((__noreturn__)) attribute_hidden;
+extern void __longjmp_chk (sigjmp_buf env, int val)
+ __attribute__ ((noreturn)) attribute_hidden;
+/* The redirection in the installed header does not work with
+ libc_hidden_proto. */
+#define longjmp __longjmp_chk
+#define siglongjmp __longjmp_chk
+libc_hidden_proto (__longjmp_chk)
+
/* Internal function to possibly save the current mask of blocked signals
in ENV, and always set the flag saying whether or not it was saved.
This is used by the machine-dependent definition of `__sigsetjmp'.