From a162c9ae9c55a9593b15ef618f4df0a045e39dbd Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Sun, 28 Jun 2009 23:51:39 +0000 Subject: Eliminate .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 everys time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kensmith) --- 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