On Wednesday June 20 2007 03:10:52 pm M.Canales.es wrote: > Hi, > > Trying to update jhalfs to match current SVN book I found some issues. > > First, when running the Cocoon sanity checks there is no > > *** stack smashing detected ***: ./strcat-overflow-ssp terminated
Did you use the fstack-protector patch? > output error for "./strcat-overflow-ssp abcdefghi", and the command > > readelf -ld strcat-overflow | \ > grep -E 'Shared object|TEXTREL' > > show nothing, at least on the build logs. That should show 'Shared object'. I think you missed the fpie patch. > Later, when building Glibc into the chroot, it bombs with: > > gcc -fPIC -fno-stack-protector -U_FORTIFY_SOURCE -nonow > -nopie ../nptl/sysdeps/unix/sysv/linux/i386/fork.c -c -std=gnu99 -O2 -Wall > -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes > -mpreferred-stack-boundary=2 -D_IO_MTSAFE_IO -I../include > -I/sources/glibc-build/posix -I/sources/glibc-build -I../sysdeps/i386/elf > -I../nptl/sysdeps/unix/sysv/linux/i386/i686 > -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 > -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread > -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu > -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet > -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv > -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix > -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu > -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 > -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 > -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 > -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 > -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic > -I../nptl -I.. -I../libio -I. -D_LIBC_REENTRANT -include > ../include/libc-symbols.h > -o /sources/glibc-build/posix/fork.o -MD -MP > -MF /sources/glibc-build/posix/fork.o.dt > -MT /sources/glibc-build/posix/fork.o > gcc: unrecognized option '-nonow' > gcc: unrecognized option '-nopie' > ../nptl/sysdeps/unix/sysv/linux/i386/../fork.c: In function '__libc_fork': > ../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:203: error: can't find a > register in class 'BREG' while reloading 'asm' > make[3]: *** [/sources/glibc-build/posix/fork.o] Error 1 > > There is also a lot of > > gcc: unrecognized option '-nonow' > gcc: unrecognized option '-nopie' > > messages before that point. Same thing, I think you missed the fpie patch. If you're getting BREG from Glibc-2.5 it's because '-fPIC' was not found to be default by ./configure (near the end of ./configure's output). Or maybe your browser cookies disabled aslr and ssp parts of the book. I commented those options out until the book uses them properly, because right now things like above could happen. robert
pgpUgospmOYJa.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/hlfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
