if (map->l_initfini != NULL) for (j = 1; map->l_initfini[j] != NULL; ++j) ++map->l_initfini[j]->l_opencount;
add_dependency (struct link_map *undef_map, struct link_map *map){  struct link_map **list;  unsigned int act;  unsigned int i;  int result = 0;  /* Make sure nobody can unload the object while we are at it.  */  __libc_lock_lock (_dl_load_lock);  /* Determine whether UNDEF_MAP already has a reference to MAP.  First     look in the normal dependencies.  */  list = undef_map->l_searchlist.r_list;  act = undef_map->l_searchlist.r_nlist;  for (i = 0; i < act; ++i)    if (list[i] == map)      break;  if (__builtin_expect (i == act, 1))    {      /* No normal dependency.  See whether we already had to add it	 to the special list of dynamic dependencies.  */      list = undef_map->l_reldeps;      act = undef_map->l_reldepsact;      for (i = 0; i < act; ++i)	if (list[i] == map)	  break;      if (i == act)	{	  /* The object is not yet in the dependency list.  Before we add	     it make sure just one more time the object we are about to	     reference is still available.  There is a brief period in	     which the object could have been removed since we found the	     definition.  */	  struct link_map *runp = _dl_loaded;	  while (runp != NULL && runp != map)	    runp = runp->l_next;	  if (runp != NULL)	    {	      /* The object is still available.  Add the reference now.  */	      if (__builtin_expect (act >= undef_map->l_reldepsmax, 0))		{		  /* Allocate more memory for the dependency list.  Since		     this can never happen during the startup phase we can		     use `realloc'.  */		  void *newp;		  undef_map->l_reldepsmax += 5;		  newp = realloc (undef_map->l_reldeps,				  undef_map->l_reldepsmax				  * sizeof(struct link_map *));		  if (__builtin_expect (newp != NULL, 1))		    undef_map->l_reldeps = (struct link_map **) newp;		  else		    /* Correct the addition.  */		    undef_map->l_reldepsmax -= 5;		}	      /* If we didn't manage to allocate memory for the list this		 is no fatal mistake.  We simply increment the use counter		 of the referenced object and don't record the dependencies.		 This means this increment can never be reverted and the		 object will never be unloaded.  This is semantically the		 correct behaviour.  */	      if (__builtin_expect (act < undef_map->l_reldepsmax, 1))		undef_map->l_reldeps[undef_map->l_reldepsact++] = map;	      /* And increment the counter in the referenced object.  */	      ++map->l_opencount;	      /* Display information if we are debugging.  */	      if (__builtin_expect (_dl_debug_files, 0))		_dl_debug_message (1, "\nfile=",				   map->l_name[0] ? map->l_name : _dl_argv[0],				   ";  needed by ",				   undef_map->l_name[0]				   ? undef_map->l_name : _dl_argv[0],				   " (relocation dependency)\n\n", NULL);	    }	  else	    /* Whoa, that was bad luck.  We have to search again.  */	    result = -1;	}    }  /* Release the lock.  */  __libc_lock_unlock (_dl_load_lock);  return result;}