[git commit] libc-internal.h: use a consistent prototype for __stack_chk_fail
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 15 12:00:22 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=0dd1ccafa75e63f7688e6d55a0158d39ae3aa060
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
include/libc-internal.h | 4 ++++
libc/sysdeps/linux/common/ssp-local.c | 2 --
libc/sysdeps/linux/common/ssp.c | 1 -
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/libc-internal.h b/include/libc-internal.h
index 9fb1ea2..dfd1dfc 100644
--- a/include/libc-internal.h
+++ b/include/libc-internal.h
@@ -70,6 +70,10 @@ extern void __chk_fail(void) attribute_noreturn;
libc_hidden_proto(__chk_fail)
# endif
+# ifdef __UCLIBC_HAS_SSP__
+extern void __stack_chk_fail(void) attribute_noreturn __cold;
+# endif
+
# endif /* IS_IN_libc */
#endif /* __ASSEMBLER__ */
diff --git a/libc/sysdeps/linux/common/ssp-local.c b/libc/sysdeps/linux/common/ssp-local.c
index 202d956..6b1809a 100644
--- a/libc/sysdeps/linux/common/ssp-local.c
+++ b/libc/sysdeps/linux/common/ssp-local.c
@@ -23,8 +23,6 @@
#include <features.h>
-extern void __stack_chk_fail (void) attribute_noreturn;
-
/* On some architectures, this helps needless PIC pointer setup
that would be needed just for the __stack_chk_fail call. */
diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c
index df242cc..07513e7 100644
--- a/libc/sysdeps/linux/common/ssp.c
+++ b/libc/sysdeps/linux/common/ssp.c
@@ -88,7 +88,6 @@ void __stack_smash_handler(char func[], int damaged)
#endif
#ifdef __UCLIBC_HAS_SSP__
-void __stack_chk_fail(void) attribute_noreturn __cold;
void __stack_chk_fail(void)
{
static const char msg1[] = "stack smashing detected: ";
More information about the uClibc-cvs
mailing list