freebsd-skq/libexec/rtld-elf/sparc64
Konstantin Belousov 9fee0541f2 Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and
phdr locks locked.  This allows to call rtld services from the
callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to
test existence of the library in the image, and for dlsym().  The
later might still be not quite safe, due to the lazy resolution of
filters.

To allow dropping the locks around iteration in dl_iterate_phdr(3), we
insert markers to track current position between relocks.  The global
objects list is converted to tailq and all iterators skip markers,
globallist_next() and globallist_curr() helpers are added.

Reported and tested by:	davide
Reviewed by:	kan
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2016-01-20 07:21:33 +00:00
..
Makefile.inc
reloc.c Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and 2016-01-20 07:21:33 +00:00
rtld_machdep.h Create a generalized exec hook that different architectures can hook 2016-01-03 04:32:02 +00:00
rtld_start.S