I removed all the ssp stuff from uClibc and am starting over. I found NetBSD's 
implementation:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/stack_protector.c
which is very very close to the older gcc-2/3 way of things. I got it working 
in uClibc with gcc4. It looks like it will be fairly easy to split it up for 
TLS, using Glibc's patch as a guild:
http://sourceware.org/ml/libc-hacker/2005-06/msg00009.html
and getting gcc3 compat should be easiest of all. As far as I can see uClibc 
should be able to support both gcc3's and gcc4's SSP at the same time, for 
folks with both compilers installed.

NetBSD has also integrated the _fortify_source stuff from gcc/libssp/:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libssp/
with wrapper headers to implement it. NetBSD also added __fgets_chk, which is 
not included with libssp and Glibc, but they removed mempcpy-chk.c and 
stpcpy-chk.c. This should work perfectly for uClibc to 
support -D_FORTIFY_SOURCE.

And, gcc/libssp uses /dev/tty if syslog doesn't work... this is probably a 
good idea for uClibc Busybox systems which may not have a syslogd running.

tally-ho
robert

Attachment: pgpe8oigyEwA7.pgp
Description: PGP signature

-- 
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to