diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-06-07 04:14:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-06-07 04:14:23 +0200 |
commit | 4fee9155f396cb2bcfe707f78aa4332837520f93 (patch) | |
tree | 5df718b52bfcdf91a0de8c880dc9e9d47bdb3432 /libc/sysdeps | |
parent | 2e045f9867bfc62e64412bc039400d411da1d2d2 (diff) |
ssp: remove SSP legacy code
Nobody should use gcc 3.3 nowadays.
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/common/ssp.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c index 8dcc3dc59..87e10c2da 100644 --- a/libc/sysdeps/linux/common/ssp.c +++ b/libc/sysdeps/linux/common/ssp.c @@ -51,18 +51,11 @@ static void __cold do_msg(const char *msg1, const char *msg2, const char *msg3) } static void __cold attribute_noreturn -#ifdef __UCLIBC_HAS_SSP_COMPAT__ -ssp_handler(char func[]) -#else ssp_handler(void) -#endif { pid_t pid; static const char msg_ssd[] = "*** stack smashing detected ***: "; static const char msg_terminated[] = " terminated"; -#ifdef __UCLIBC_HAS_SSP_COMPAT__ - static const char msg_ssa[] = ": stack smashing attack in function "; -#endif #ifdef __DODEBUG__ struct sigaction sa; @@ -73,12 +66,7 @@ ssp_handler(void) sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */ #endif -#ifdef __UCLIBC_HAS_SSP_COMPAT__ - if (func != NULL) - do_msg(__uclibc_progname, msg_ssa, func); - else -#endif - do_msg(msg_ssd, __uclibc_progname, msg_terminated); + do_msg(msg_ssd, __uclibc_progname, msg_terminated); pid = getpid(); #ifdef __DODEBUG__ @@ -96,20 +84,7 @@ ssp_handler(void) _exit(127); } -#ifdef __UCLIBC_HAS_SSP_COMPAT__ -void __stack_smash_handler(char func[], int damaged) attribute_noreturn __cold; -void __stack_smash_handler(char func[], int damaged attribute_unused) -{ - ssp_handler(func); -} - -void __stack_chk_fail(void) -{ - ssp_handler(NULL); -} -#else strong_alias(ssp_handler,__stack_chk_fail) -#endif #ifdef __UCLIBC_HAS_FORTIFY__ /* should be redone when activated to use common code above. |