const char *reference_name = undef_map ? undef_map->l_name : NULL;
const char *reference_name = undef_map ? undef_map->l_name : "";
_dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,		     const ElfW(Sym) **ref,		     struct r_scope_elem *symbol_scope[],		     const struct r_found_version *version,		     int type_class, int flags, struct link_map *skip_map){  const unsigned long int hash = _dl_elf_hash (undef_name);  struct sym_val current_value = { NULL, NULL };  struct r_scope_elem **scope = symbol_scope;  bump_num_relocations ();  /* No other flag than DL_LOOKUP_ADD_DEPENDENCY is allowed if we look     up a versioned symbol.  */  assert (version == NULL || flags == 0 || flags == DL_LOOKUP_ADD_DEPENDENCY);  size_t i = 0;  if (__builtin_expect (skip_map != NULL, 0))    {      /* Search the relevant loaded objects for a definition.  */      while ((*scope)->r_list[i] != skip_map)	++i;      assert (i < (*scope)->r_nlist);    }  /* Search the relevant loaded objects for a definition.  */  for (size_t start = i; *scope != NULL; start = 0, ++scope)    {      int res = do_lookup_x (undef_name, hash, *ref, &current_value, *scope,			     start, version, flags, skip_map, type_class);      if (res > 0)	break;      if (__builtin_expect (res, 0) < 0 && skip_map == NULL)	{	  /* Oh, oh.  The file named in the relocation entry does not	     contain the needed symbol.  This code is never reached	     for unversioned lookups.  */	  assert (version != NULL);	  const char *reference_name = undef_map ? undef_map->l_name : NULL;	  /* XXX We cannot translate the message.  */	  _dl_signal_cerror (0, (reference_name[0]				 ? reference_name				 : (rtld_progname ?: "<main program>")),			     N_("relocation error"),			     make_string ("symbol ", undef_name, ", version ",					  version->name,					  " not defined in file ",					  version->filename,					  " with link time reference",					  res == -2					  ? " (no version symbols)" : ""));	  *ref = NULL;	  return 0;	}    }  if (__builtin_expect (current_value.s == NULL, 0))    {      if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)	  && skip_map == NULL)	{	  /* We could find no value for a strong reference.  */	  const char *reference_name = undef_map ? undef_map->l_name : NULL;	  const char *versionstr = version ? ", version " : "";	  const char *versionname = (version && version->name				     ? version->name : "");	  /* XXX We cannot translate the message.  */	  _dl_signal_cerror (0, (reference_name[0]				 ? reference_name				 : (rtld_progname ?: "<main program>")), NULL,			     make_string (undefined_msg, undef_name,					  versionstr, versionname));	}      *ref = NULL;      return 0;    }  int protected = (*ref		   && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED);  if (__builtin_expect (protected != 0, 0))    {      /* It is very tricky.  We need to figure out what value to         return for the protected symbol.  */      if (type_class == ELF_RTYPE_CLASS_PLT)	{	  if (current_value.s != NULL && current_value.m != undef_map)	    {	      current_value.s = *ref;	      current_value.m = undef_map;	    }	}      else	{	  struct sym_val protected_value = { NULL, NULL };	  for (scope = symbol_scope; *scope; i = 0, ++scope)	    if (do_lookup_x (undef_name, hash, *ref, &protected_value,			     *scope, i, version, flags, skip_map,			     ELF_RTYPE_CLASS_PLT) != 0)	      break;	  if (protected_value.s != NULL	      && protected_value.m != undef_map)	    {	      current_value.s = *ref;	      current_value.m = undef_map;	    }	}    }  /* We have to check whether this would bind UNDEF_MAP to an object     in the global scope which was dynamically loaded.  In this case     we have to prevent the latter from being unloaded unless the     UNDEF_MAP object is also unloaded.  */  if (__builtin_expect (current_value.m->l_type == lt_loaded, 0)      /* Don't do this for explicit lookups as opposed to implicit	 runtime lookups.  */      && (flags & DL_LOOKUP_ADD_DEPENDENCY) != 0      /* Add UNDEF_MAP to the dependencies.  */      && add_dependency (undef_map, current_value.m) < 0)      /* Something went wrong.  Perhaps the object we tried to reference	 was just removed.  Try finding another definition.  */      return _dl_lookup_symbol_x (undef_name, undef_map, ref,				  symbol_scope, version, type_class,				  flags, skip_map);  if (__builtin_expect (GLRO(dl_debug_mask)			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))    _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,			&current_value, version, type_class, protected);  *ref = current_value.s;  return LOOKUP_VALUE (current_value.m);}