if (loader->l_info[DT_RUNPATH] == NULL) {
*wp = '\0';
INTDEF (_dl_map_object)voidinternal_function_dl_rtld_di_serinfo (struct link_map *loader, Dl_serinfo *si, bool counting){  if (counting)    {      si->dls_cnt = 0;      si->dls_size = 0;    }  unsigned int idx = 0;  char *allocptr = (char *) &si->dls_serpath[si->dls_cnt];  void add_path (const struct r_search_path_struct *sps, unsigned int flags)# define add_path(sps, flags) add_path(sps, 0) /* XXX */    {      if (sps->dirs != (void *) -1)	{	  struct r_search_path_elem **dirs = sps->dirs;	  do	    {	      const struct r_search_path_elem *const r = *dirs++;	      if (counting)		{		  si->dls_cnt++;		  si->dls_size += r->dirnamelen;		}	      else		{		  Dl_serpath *const sp = &si->dls_serpath[idx++];		  sp->dls_name = allocptr;		  allocptr = __mempcpy (allocptr,					r->dirname, r->dirnamelen - 1);		  *allocptr++ = '\0';		  sp->dls_flags = flags;		}	    }	  while (*dirs != NULL);	}    }  /* When the object has the RUNPATH information we don't use any RPATHs.  */  if (loader->l_info[DT_RUNPATH] == NULL)    {      /* First try the DT_RPATH of the dependent object that caused NAME	 to be loaded.  Then that object's dependent, and on up.  */      struct link_map *l = loader;      do	{	  if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))	    add_path (&l->l_rpath_dirs, XXX_RPATH);	  l = l->l_loader;	}      while (l != NULL);      /* If dynamically linked, try the DT_RPATH of the executable itself.  */      l = GL(dl_loaded);      if (l != NULL && l->l_type != lt_loaded && l != loader)	if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH"))	  add_path (&l->l_rpath_dirs, XXX_RPATH);    }  /* Try the LD_LIBRARY_PATH environment variable.  */  add_path (&env_path_list, XXX_ENV);  /* Look at the RUNPATH information for this binary.  */  if (cache_rpath (loader, &loader->l_runpath_dirs, DT_RUNPATH, "RUNPATH"))    add_path (&loader->l_runpath_dirs, XXX_RUNPATH);  /* XXX     Here is where ld.so.cache gets checked, but we don't have     a way to indicate that in the results for Dl_serinfo.  */  /* Finally, try the default path.  */  if (!(loader->l_flags_1 & DF_1_NODEFLIB))    add_path (&rtld_search_dirs, XXX_default);  if (counting)    /* Count the struct size before the string area, which we didn't       know before we completed dls_cnt.  */    si->dls_size += (char *) &si->dls_serpath[si->dls_cnt] - (char *) si;}