__libc_lock_unlock_recursive (GL(dl_load_lock));
__rtld_lock_unlock_recursive (GL(dl_load_lock));
add_dependency (struct link_map *undef_map, struct link_map *map){  struct link_map **list;  struct link_map *runp;  unsigned int act;  unsigned int i;  int result = 0;  /* Avoid self-references.  */  if (undef_map == map)    return 0;  /* Don't create cross-reference between modules which are     dynamically loaded by the same dlopen() call.  */  if (undef_map->l_opencount == 0 && map->l_opencount == 0)    return 0;  /* Make sure nobody can unload the object while we are at it.  */  __libc_lock_lock_recursive (GL(dl_load_lock));  /* Determine whether UNDEF_MAP already has a reference to MAP.  First     look in the normal dependencies.  */  if (undef_map->l_searchlist.r_list != NULL)    {      list = undef_map->l_initfini;      for (i = 0; list[i] != NULL; ++i)	if (list[i] == map)	  goto out;    }  /* 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)      goto out;  /* 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.  */  runp = GL(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	 behavior.  */      if (__builtin_expect (act < undef_map->l_reldepsmax, 1))	undef_map->l_reldeps[undef_map->l_reldepsact++] = map;      if (map->l_searchlist.r_list != NULL)	/* And increment the counter in the referenced object.  */	++map->l_opencount;      else	/* We have to bump the counts for all dependencies since so far	   this object was only a normal or transitive dependency.	   Now it might be closed with _dl_close() directly.  */	for (list = map->l_initfini; *list != NULL; ++list)	  ++(*list)->l_opencount;      /* Display information if we are debugging.  */      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))	INTUSE(_dl_debug_printf) ("\\nfile=%s;  needed by %s (relocation dependency)\n\n",				  map->l_name[0] ? map->l_name : rtld_progname,				  undef_map->l_name[0]				  ? undef_map->l_name : rtld_progname);    }  else    /* Whoa, that was bad luck.  We have to search again.  */    result = -1; out:  /* Release the lock.  */  __libc_lock_unlock_recursive (GL(dl_load_lock));  return result;}