From 2286fe763592aa13d320186bf3e233a560af749b Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Tue, 14 Jul 2009 21:19:13 +0000 Subject: 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) --- libexec/rtld-elf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libexec') diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 7c2039845b611..5e9729c68bde7 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -22,7 +22,7 @@ MLINKS= rtld.1 ld-elf.so.1.1 \ CFLAGS+= -fpic -DPIC LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} -LDADD= -lc_pic +LDADD= -lc_pic -lssp_nonshared .if ${MACHINE_ARCH} != "ia64" .if ${MK_SYMVER} == "yes" -- cgit v1.3