{ char *newsecname = strdup (stabstr_secname); if (newsecname == 0) as_fatal ("out of memory"); seg->name = newsecname; }
seg->name = xstrdup (stabstr_secname);
get_stab_string_offset (string, stabstr_secname)     const char *string;     const char *stabstr_secname;{  unsigned int length;  unsigned int retval;  if (! SEPARATE_STAB_SECTIONS)    abort ();  retval = 0;  length = strlen (string);  if (length > 0)    {				/* Ordinary case. */      segT save_seg;      subsegT save_subseg;      segT seg;      char *p;      save_seg = now_seg;      save_subseg = now_subseg;      /* Create the stab string section.  */      seg = subseg_new (stabstr_secname, 0);      retval = seg_info (seg)->stabu.stab_string_size;      if (retval <= 0)	{	  /* Make sure the first string is empty.  */	  p = frag_more (1);	  *p = 0;	  retval = seg_info (seg)->stabu.stab_string_size = 1;#ifdef BFD_ASSEMBLER	  bfd_set_section_flags (stdoutput, seg, SEC_READONLY | SEC_DEBUGGING);	  if (seg->name == stabstr_secname)	    {	      char *newsecname = strdup (stabstr_secname);	      if (newsecname == 0)		as_fatal ("out of memory");	      seg->name = newsecname;	    }#endif	}      p = frag_more (length + 1);      strcpy (p, string);      seg_info (seg)->stabu.stab_string_size += length + 1;      subseg_set (save_seg, save_subseg);    }  return retval;}