From 2e9d2266c0cea250f7a87dc6aa2b02d0bd5a0aea Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 21:49:38 +0100 Subject: Correct ssp code Avoid using strong_alias in ssp, some archs dislike it. Make stack_chk_guard static. Export __stack_smash_handler only if compatibility option is enabled. Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/ssp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/ssp.c') diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c index a2d7ff2ca..d81c706f4 100644 --- a/libc/sysdeps/linux/common/ssp.c +++ b/libc/sysdeps/linux/common/ssp.c @@ -71,6 +71,7 @@ static attribute_noreturn void terminate(void) _exit(127); } +#ifdef __UCLIBC_HAS_SSP_COMPAT__ void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn __cold; void __stack_smash_handler(char func[], int damaged) { @@ -84,6 +85,7 @@ void __stack_smash_handler(char func[], int damaged) while(1) terminate(); } +#endif void __stack_chk_fail(void) attribute_noreturn __cold; void __stack_chk_fail(void) @@ -114,4 +116,3 @@ void __chk_fail(void) while(1) terminate(); } - -- cgit v1.2.3