DragonFly users List (threaded) for 2008-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
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'
:~$
:
:--
:Hasso Tepper
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:
leaf:/archive/FreeBSD-current/src/lib/libc/sys/stack_protector.c
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]