DragonFly users List (threaded) for 2008-04
Re: Stack protector broken in gcc41?
:Even hello world fails to link:
:~$ gcc -fstack-protector-all -o hello-world hello-world.c
:/tmp//cckehwVf.o: In function `main':
:hello-world.c:(.text+0x12): undefined reference to `__stack_chk_guard'
:hello-world.c:(.text+0x35): undefined reference to `__stack_chk_guard'
:hello-world.c:(.text+0x3c): undefined reference to `__stack_chk_fail'
They must have changed the symbols. libc only has the
__stack_smash_handler symbol (which is what the original stack
protector code needed).
It sounds like the new symbols and supporting code will have to be
added to libc.
FreeBSD seems to have an implementation, though they are using a
sysctl to get the random seed. A little surgery to replace
that with our /dev/urandom code and we'd be golden: