diff options
author | kan <kan@FreeBSD.org> | 2009-07-14 21:19:13 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2009-07-14 21:19:13 +0000 |
commit | ef443476d9706035ac219f0280ef0b817dda7a6d (patch) | |
tree | 50c2540e7067c9b377ade1910cd0348aeab454e7 /contrib | |
parent | d81f73fcb520cff58dcafda0e644b91837b26a40 (diff) | |
download | FreeBSD-src-ef443476d9706035ac219f0280ef0b817dda7a6d.zip FreeBSD-src-ef443476d9706035ac219f0280ef0b817dda7a6d.tar.gz |
Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.
Reviewed by: kib
Approved by: re (kib)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/config/freebsd-spec.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/gcc/config/freebsd-spec.h b/contrib/gcc/config/freebsd-spec.h index a58788a..06735c8 100644 --- a/contrib/gcc/config/freebsd-spec.h +++ b/contrib/gcc/config/freebsd-spec.h @@ -168,6 +168,7 @@ is built with the --enable-threads configure-time option.} \ %{pg: %{pthread:-lpthread_p} -lc_p}} \ %{shared: \ %{pthread:-lpthread} -lc} \ + %{fstack-protector|fstack-protector-all:-lssp_nonshared} \ " #endif #endif |