assert (_dl_debug_initialize (0)->r_state == RT_CONSISTENT);
_dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,	  int argc, char *argv[], char *env[]){  struct dl_open_args args;  const char *objname;  const char *errstring;  int errcode;  if ((mode & RTLD_BINDING_MASK) == 0)    /* One of the flags must be set.  */    _dl_signal_error (EINVAL, file, NULL, N_("invalid mode for dlopen()"));  /* Make sure we are alone.  */  __rtld_lock_lock_recursive (GL(dl_load_lock));  assert (_dl_debug_initialize (0)->r_state == RT_CONSISTENT);  if (nsid == LM_ID_NEWLM)    {      /* Find a new namespace.  */      for (nsid = 1; nsid < DL_NNS; ++nsid)	if (GL(dl_ns)[nsid]._ns_loaded == NULL)	  break;      if (nsid == DL_NNS)	{	  /* No more namespace available.  */	  __rtld_lock_unlock_recursive (GL(dl_load_lock));	  _dl_signal_error (EINVAL, file, NULL, N_("\no more namespaces available for dlmopen()"));	}    }  /* Never allow loading a DSO in a namespace which is empty.  Such     direct placements is only causing problems.  Also don't allow     loading into a namespace used for auditing.  */  else if (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER	   && (GL(dl_ns)[nsid]._ns_nloaded == 0	       || GL(dl_ns)[nsid]._ns_loaded->l_auditing))    _dl_signal_error (EINVAL, file, NULL,		      N_("invalid target namespace in dlmopen()"));  args.file = file;  args.mode = mode;  args.caller_dlopen = caller_dlopen;  args.caller_dl_open = RETURN_ADDRESS (0);  args.map = NULL;  args.nsid = nsid;  args.argc = argc;  args.argv = argv;  args.env = env;  errcode = _dl_catch_error (&objname, &errstring, dl_open_worker, &args);#ifndef MAP_COPY  /* We must munmap() the cache file.  */  _dl_unload_cache ();#endif  /* Release the lock.  */  __rtld_lock_unlock_recursive (GL(dl_load_lock));  if (__builtin_expect (errstring != NULL, 0))    {      /* Some error occurred during loading.  */      char *local_errstring;      size_t len_errstring;      /* Remove the object from memory.  It may be in an inconsistent	 state if relocation failed, for example.  */      if (args.map)	{	  /* Increment open counters for all objects since this	     sometimes has not happened yet.  */	  if (args.map->l_searchlist.r_list[0]->l_opencount == 0)	    for (unsigned int i = 0; i < args.map->l_searchlist.r_nlist; ++i)	      ++args.map->l_searchlist.r_list[i]->l_opencount;#ifdef USE_TLS	  /* Maybe some of the modules which were loaded use TLS.	     Since it will be removed in the following _dl_close call	     we have to mark the dtv array as having gaps to fill the	     holes.  This is a pessimistic assumption which won't hurt	     if not true.  There is no need to do this when we are	     loading the auditing DSOs since TLS has not yet been set	     up.  */	  if ((mode & __RTLD_AUDIT) == 0)	    GL(dl_tls_dtv_gaps) = true;#endif	  _dl_close (args.map);	}      /* Make a local copy of the error string so that we can release the	 memory allocated for it.  */      len_errstring = strlen (errstring) + 1;      if (objname == errstring + len_errstring)	{	  size_t total_len = len_errstring + strlen (objname) + 1;	  local_errstring = alloca (total_len);	  memcpy (local_errstring, errstring, total_len);	  objname = local_errstring + len_errstring;	}      else	{	  local_errstring = alloca (len_errstring);	  memcpy (local_errstring, errstring, len_errstring);	}      if (errstring != INTUSE(_dl_out_of_memory))	free ((char *) errstring);      assert (_dl_debug_initialize (0)->r_state == RT_CONSISTENT);      /* Reraise the error.  */      _dl_signal_error (errcode, objname, NULL, local_errstring);    }  assert (_dl_debug_initialize (0)->r_state == RT_CONSISTENT);#ifndef SHARED  DL_STATIC_INIT (args.map);#endif  return args.map;}