freebsd-nq/libexec/rtld-elf/i386
Konstantin Belousov 5734c46c68 _rtld_bind() read-locks the bind lock, and possible plt resolution
from the dispatcher would also acquire bind lock in read mode, which
is the supported operation. plt is explicitely designed to allow safe
multithreaded updates, so the shared lock do not cause problems.

The error in r228435 is that it allows read lock acquisition after the
write lock for the bind block.  If we dlopened the shared object that
contains IRELATIVE or jump slot which target is STT_GNU_IFUNC, then
possible recursive plt resolve from the dispatcher would cause it.

Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher.  Use
initlist to iterate over the objects instead of the ->next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC after:	3 weeks
2011-12-14 16:47:53 +00:00
..
elf_rtld.x
Makefile.inc Sort -mno-(mmx|3dnow|sse|sse2|sse3) options consistently throughout the 2011-01-05 21:23:26 +00:00
reloc.c _rtld_bind() read-locks the bind lock, and possible plt resolution 2011-12-14 16:47:53 +00:00
rtld_machdep.h When loading dso without PT_GNU_STACK phdr, only call 2011-01-25 21:12:31 +00:00
rtld_start.S - change "is is" to "is" or "it is" 2011-10-16 14:30:28 +00:00
Symbol.map Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00