ProPolice symbols in libc or libssp ?

Joerg Sonnenberger joerg at britannica.bec.de
Thu Jul 28 22:32:38 GMT 2005


On Fri, Jul 29, 2005 at 12:14:47AM +0200, Jeremie Le Hen wrote:
> > Make sure you patch the right place and _not_ the shared part. Does the
> > attached patch work for you?
> 
> Yes, this worked, thank you !  This implies that libssp must be linked
> with -nodefaultlibs option to avoid linking itself against libssp.  But
> this also prevents it from being linked against libgcc.  Is it
> something harmful or not (in other words should I manually add -lgcc to
> LDFLAGS) ?

The problem with linking -lssp is that you normally want to aovid the
circular dependency with libc. For static libraries that's not a
problem, but for dynamic loading it is a bit nasty. One idea is to build
libssp similiar to RTLD by directly linking the necessary parts of libc
in, you can use a linker script to hide the symbols. 

For linking -lssp itself, you could try to exploit
"-fno-stack-protector" and use that to not link libssp into.

Joerg


More information about the freebsd-hackers mailing list