Hello, I would personally create a new config option for FORTIFY stuff (independently of SSP), provide *_chk() functions only if the config option is enabled and move __chk_fail out of ssp.c (for ex. into fortify.c)
libc_hidden_proto/def is OK for the __chk_fail function itself, but not enough for __stack_chk_fail (since it provides only the __GI___stack_chk_fail but does not use it) Peter -------- Original-Nachricht -------- > Datum: Tue, 8 Mar 2011 12:24:35 +0100 > Von: Carmelo AMOROSO <[email protected]> > An: "[email protected]" <[email protected]> > Betreff: Re: [PATCH 1/2] ssp.c: use libc_hidden_proto and libc_hidden_def. > On 3/8/2011 11:59 AM, Peter Mazinger wrote: > > Hello William, > > > > Do you have jump relocations for __chk_fail on x86_64? > > > > Thanks, Peter > > > > See bug 2713. [https://bugs.busybox.net/show_bug.cgi?id=2713] > > > > -------- Original-Nachricht -------- > > > Datum: Tue, 8 Mar 2011 01:45:35 -0600 > > > Von: William Pitcock <[email protected]> > > > An: > > > Betreff: [PATCH 1/2] ssp.c: use libc_hidden_proto and > libc_hidden_def. > > > > > This allows us to make the stack smashing features on x86_64 > available. > > > > > > Signed-off-by: William Pitcock <[email protected]> > > > --- > > > libc/sysdeps/linux/common/ssp.c | 4 ++++ > > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > > > diff --git a/libc/sysdeps/linux/common/ssp.c > > > b/libc/sysdeps/linux/common/ssp.c > > > index d81c706..57a093b 100644 > > > --- a/libc/sysdeps/linux/common/ssp.c > > > +++ b/libc/sysdeps/linux/common/ssp.c > > > @@ -88,6 +88,7 @@ void __stack_smash_handler(char func[], int > damaged) > > > #endif > > > > > > void __stack_chk_fail(void) attribute_noreturn __cold; > > > +libc_hidden_proto(__stack_chk_fail) > > > void __stack_chk_fail(void) > > > { > > > static const char msg1[] = "stack smashing detected: "; > > > @@ -101,8 +102,10 @@ void __stack_chk_fail(void) > > > while(1) > > > terminate(); > > > } > > > +libc_hidden_def(__stack_chk_fail) > > > > > > void __chk_fail(void) attribute_noreturn; > > > +libc_hidden_proto(__chk_fail) > > > void __chk_fail(void) > > > { > > > static const char msg1[] = "buffer overflow detected: "; > > > @@ -116,3 +119,4 @@ void __chk_fail(void) > > > while(1) > > > terminate(); > > > } > > > +libc_hidden_def(__chk_fail) > > > -- > > > 1.7.4.1 > > > > > > _______________________________________________ > > > uClibc mailing list > > > [email protected] > > > http://lists.busybox.net/mailman/listinfo/uclibc > > > > -- > > NEU: FreePhone - kostenlos mobil telefonieren und surfen! > > Jetzt informieren: http://www.gmx.net/de/go/freephone > > _______________________________________________ > > uClibc mailing list > > [email protected] > > http://lists.busybox.net/mailman/listinfo/uclibc > > > _______________________________________________ > uClibc mailing list > [email protected] > http://lists.busybox.net/mailman/listinfo/uclibc -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
