* dll_init.cc (reserve_upto): removed (buggy, no longer needed) (release_upto): ditto. (dll_list::reserve_space): new function to reserve space needed by DLL_LOAD dlls early in the fork process. Exit cleanly and report to parent if fork failed due to clobbered address space. (dll_list::load_after_fork): rewritten. New version uses recursion to track reservations it makes while trying to make dlls land where they belong. (dll_list::load_after_fork_impl): see above. (dll_list::alloc): initialize image base field. * dll_init.h (struct dll_list): declare new functions. (struct dll): add member to track image base. * fork.cc (frok::child): call dll_list::reserve_space early, so we can retry if it fails.