++name; if ((len = is_dst (start, name, "ORIGIN", is_path, INTUSE(__libc_enable_secure))) != 0) repl = l->l_origin; else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0) repl = GL(dl_platform); else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0) repl = DL_DST_LIB;
total = DL_DST_REQUIRED (l, s, strlen (s), cnt);
INTDEF (_dl_dst_count)char *_dl_dst_substitute (struct link_map *l, const char *name, char *result,		    int is_path){  const char *const start = name;  char *last_elem, *wp;  /* Now fill the result path.  While copying over the string we keep     track of the start of the last path element.  When we come accross     a DST we copy over the value or (if the value is not available)     leave the entire path element out.  */  last_elem = wp = result;  do    {      if (__builtin_expect (*name == '$', 0))	{	  const char *repl = NULL;	  size_t len;	  ++name;	  if ((len = is_dst (start, name, "ORIGIN", is_path,			     INTUSE(__libc_enable_secure))) != 0)	    repl = l->l_origin;	  else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)	    repl = GL(dl_platform);	  else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)	    repl = DL_DST_LIB;	  if (repl != NULL && repl != (const char *) -1)	    {	      wp = __stpcpy (wp, repl);	      name += len;	    }	  else if (len > 1)	    {	      /* We cannot use this path element, the value of the		 replacement is unknown.  */	      wp = last_elem;	      name += len;	      while (*name != '\0' && (!is_path || *name != ':'))		++name;	    }	  else	    /* No DST we recognize.  */	    *wp++ = '$';	}      else	{	  *wp++ = *name++;	  if (is_path && *name == ':')	    last_elem = wp;	}    }  while (*name != '\0');  *wp = '\0';  return result;}