diff options
author | kan <kan@FreeBSD.org> | 2009-09-17 13:21:53 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2009-09-17 13:21:53 +0000 |
commit | 74dba11aaa299f71f2bf2b583d74575fec440e7b (patch) | |
tree | b490b1d8c151e2f8662cd44424a62252358a1a9a /lib | |
parent | c6d8733edc1a9b777056acd234c7a45b857eaa2f (diff) | |
download | FreeBSD-src-74dba11aaa299f71f2bf2b583d74575fec440e7b.zip FreeBSD-src-74dba11aaa299f71f2bf2b583d74575fec440e7b.tar.gz |
Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/stack_protector.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c index 63beebc..14c20eb 100644 --- a/lib/libc/sys/stack_protector.c +++ b/lib/libc/sys/stack_protector.c @@ -108,4 +108,8 @@ __chk_fail(void) __fail("buffer overflow detected; terminated"); } +#ifdef PIC __sym_compat(__stack_chk_fail_local, __stack_chk_fail, FBSD_1.0); +#else +__weak_reference(__stack_chk_fail, __stack_chk_fail_local); +#endif |