dependencies in the executable's searchlist for symbol resolution. */
_dl_map_object_deps (l, preloads, npreloads, mode == trace);
+ {
+ /* We should also load the preloaded objects dependencies. They
+ may call dlsym (RTLD_NEXT, ...). */
+ unsigned int i;
+ for (i = 0; i < npreloads; i++)
+ _dl_map_object_deps (preloads[i], NULL, 0, mode == trace);
+ }
+
#ifndef MAP_ANON
/* We are done mapping things, so close the zero-fill descriptor. */
__close (_dl_zerofd);