freebsd-skq/libexec/rtld-elf
Konstantin Belousov 1c70d00733 Right now, the rtld prefork hook locks the rtld bind lock in the read
mode.  This allows the binder to be functional in the child after the
fork (assuming no lazy loading of a filter is needed), but other rtld
services which require write lock on rtld_bind_lock cause deadlock, if
called by child.

Change the _rtld_atfork() to lock the bind lock in write mode, making
the rtld fully functional after the fork.

Pre-resolve the symbols which are called by the libthr' fork()
interposer, since dynamic resolution causes deadlock due to the
rtld_bind_lock already owned in the write mode.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-05-24 10:23:06 +00:00
..
amd64 Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers 2014-04-14 22:44:50 +00:00
arm Merging of projects/armv6, part 2 2012-08-15 03:07:41 +00:00
i386 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
ia64 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
mips Before jumping to application's entry point set ra == pc in order 2012-03-23 17:54:06 +00:00
powerpc Revert r253748,253749 2013-07-28 18:44:17 +00:00
powerpc64 Revert r253748,253749 2013-07-28 18:44:17 +00:00
sparc64 Add GNU hash support for rtld. 2012-04-30 13:31:10 +00:00
debug.c Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
debug.h
libmap.c Fix LD_LIBMAP. 2014-05-18 17:14:08 +00:00
libmap.h Make the directory mapping functionality, which was previously only 2013-09-21 21:03:52 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
malloc.c Before calling mmap() on a shared library's text and data sections, rtld 2014-04-11 16:55:25 +00:00
map_object.c Before calling mmap() on a shared library's text and data sections, rtld 2014-04-11 16:55:25 +00:00
rtld_lock.c Right now, the rtld prefork hook locks the rtld bind lock in the read 2014-05-24 10:23:06 +00:00
rtld_lock.h Implement support for ELF filters in rtld. Both normal and auxillary 2010-12-25 08:51:20 +00:00
rtld_printf.c Remove the use of toupper() from rtld_printf.c. Use of the libc function 2012-03-09 16:21:40 +00:00
rtld_printf.h Rtld links with the specially built pic static libc library to get some 2011-08-24 20:05:13 +00:00
rtld_tls.h
rtld.1 Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 2012-07-15 10:53:48 +00:00
rtld.c - Export the function added in r265456 rather than the non-existent 2014-05-07 17:21:22 +00:00
rtld.h Before calling mmap() on a shared library's text and data sections, rtld 2014-04-11 16:55:25 +00:00
Symbol.map - Export the function added in r265456 rather than the non-existent 2014-05-07 17:21:22 +00:00
xmalloc.c Increase alignment to size of pointer if the alignment is too small. 2014-02-22 11:06:48 +00:00