{ bfd_set_error (bfd_error_no_memory); return false; }
return false;
static struct bfd_hash_entry *string_hash_newfunc  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,	   const char *));static void ecoff_align_debug PARAMS ((bfd *abfd,				       struct ecoff_debug_info *debug,				       const struct ecoff_debug_swap *swap));static boolean ecoff_write_symhdr PARAMS ((bfd *, struct ecoff_debug_info *,					   const struct ecoff_debug_swap *,					   file_ptr where));static int cmp_fdrtab_entry PARAMS ((const PTR, const PTR));static boolean mk_fdrtab PARAMS ((bfd *,				  struct ecoff_debug_info * const,				  const struct ecoff_debug_swap * const,				  struct ecoff_find_line *));static long fdrtab_lookup PARAMS ((struct ecoff_find_line *, bfd_vma));/* Obstack allocation and deallocation routines.  */#define obstack_chunk_alloc malloc#define obstack_chunk_free free/* Routines to swap auxiliary information in and out.  I am assuming   that the auxiliary information format is always going to be target   independent.  *//* Swap in a type information record.   BIGEND says whether AUX symbols are big-endian or little-endian; this   info comes from the file header record (fh-fBigendian).  */void_bfd_ecoff_swap_tir_in (bigend, ext_copy, intern)     int bigend;     const struct tir_ext *ext_copy;     TIR *intern;{  struct tir_ext ext[1];  *ext = *ext_copy;		/* Make it reasonable to do in-place.  */    /* now the fun stuff... */  if (bigend) {    intern->fBitfield   = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_BIG);    intern->continued   = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_BIG);    intern->bt          = (ext->t_bits1[0] & TIR_BITS1_BT_BIG)			>>		    TIR_BITS1_BT_SH_BIG;    intern->tq4         = (ext->t_tq45[0] & TIR_BITS_TQ4_BIG)			>>		    TIR_BITS_TQ4_SH_BIG;    intern->tq5         = (ext->t_tq45[0] & TIR_BITS_TQ5_BIG)			>>		    TIR_BITS_TQ5_SH_BIG;    intern->tq0         = (ext->t_tq01[0] & TIR_BITS_TQ0_BIG)			>>		    TIR_BITS_TQ0_SH_BIG;    intern->tq1         = (ext->t_tq01[0] & TIR_BITS_TQ1_BIG)			>>		    TIR_BITS_TQ1_SH_BIG;    intern->tq2         = (ext->t_tq23[0] & TIR_BITS_TQ2_BIG)			>>		    TIR_BITS_TQ2_SH_BIG;    intern->tq3         = (ext->t_tq23[0] & TIR_BITS_TQ3_BIG)			>>		    TIR_BITS_TQ3_SH_BIG;  } else {    intern->fBitfield   = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_LITTLE);    intern->continued   = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_LITTLE);    intern->bt          = (ext->t_bits1[0] & TIR_BITS1_BT_LITTLE)			>>		    TIR_BITS1_BT_SH_LITTLE;    intern->tq4         = (ext->t_tq45[0] & TIR_BITS_TQ4_LITTLE)			>>		    TIR_BITS_TQ4_SH_LITTLE;    intern->tq5         = (ext->t_tq45[0] & TIR_BITS_TQ5_LITTLE)			>>		    TIR_BITS_TQ5_SH_LITTLE;    intern->tq0         = (ext->t_tq01[0] & TIR_BITS_TQ0_LITTLE)			>>		    TIR_BITS_TQ0_SH_LITTLE;    intern->tq1         = (ext->t_tq01[0] & TIR_BITS_TQ1_LITTLE)			>>		    TIR_BITS_TQ1_SH_LITTLE;    intern->tq2         = (ext->t_tq23[0] & TIR_BITS_TQ2_LITTLE)			>>		    TIR_BITS_TQ2_SH_LITTLE;    intern->tq3         = (ext->t_tq23[0] & TIR_BITS_TQ3_LITTLE)			>>		    TIR_BITS_TQ3_SH_LITTLE;  }#ifdef TEST  if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    abort();#endif}/* Swap out a type information record.   BIGEND says whether AUX symbols are big-endian or little-endian; this   info comes from the file header record (fh-fBigendian).  */void_bfd_ecoff_swap_tir_out (bigend, intern_copy, ext)     int bigend;     const TIR *intern_copy;     struct tir_ext *ext;{  TIR intern[1];  *intern = *intern_copy;	/* Make it reasonable to do in-place.  */    /* now the fun stuff... */  if (bigend) {    ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_BIG : 0)		       | (intern->continued ? TIR_BITS1_CONTINUED_BIG : 0)		       | ((intern->bt << TIR_BITS1_BT_SH_BIG)			  & TIR_BITS1_BT_BIG));    ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_BIG)		       & TIR_BITS_TQ4_BIG)		      | ((intern->tq5 << TIR_BITS_TQ5_SH_BIG)			 & TIR_BITS_TQ5_BIG));    ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_BIG)		       & TIR_BITS_TQ0_BIG)		      | ((intern->tq1 << TIR_BITS_TQ1_SH_BIG)			 & TIR_BITS_TQ1_BIG));    ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_BIG)		       & TIR_BITS_TQ2_BIG)		      | ((intern->tq3 << TIR_BITS_TQ3_SH_BIG)			 & TIR_BITS_TQ3_BIG));  } else {    ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_LITTLE : 0)		       | (intern->continued ? TIR_BITS1_CONTINUED_LITTLE : 0)		       | ((intern->bt << TIR_BITS1_BT_SH_LITTLE)			  & TIR_BITS1_BT_LITTLE));    ext->t_tq45[0] = (((intern->tq4 << TIR_BITS_TQ4_SH_LITTLE)		       & TIR_BITS_TQ4_LITTLE)		      | ((intern->tq5 << TIR_BITS_TQ5_SH_LITTLE)			 & TIR_BITS_TQ5_LITTLE));    ext->t_tq01[0] = (((intern->tq0 << TIR_BITS_TQ0_SH_LITTLE)		       & TIR_BITS_TQ0_LITTLE)		      | ((intern->tq1 << TIR_BITS_TQ1_SH_LITTLE)			 & TIR_BITS_TQ1_LITTLE));    ext->t_tq23[0] = (((intern->tq2 << TIR_BITS_TQ2_SH_LITTLE)		       & TIR_BITS_TQ2_LITTLE)		      | ((intern->tq3 << TIR_BITS_TQ3_SH_LITTLE)			 & TIR_BITS_TQ3_LITTLE));  }#ifdef TEST  if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    abort();#endif}/* Swap in a relative symbol record.  BIGEND says whether it is in   big-endian or little-endian format.*/void_bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern)     int bigend;     const struct rndx_ext *ext_copy;     RNDXR *intern;{  struct rndx_ext ext[1];  *ext = *ext_copy;		/* Make it reasonable to do in-place.  */    /* now the fun stuff... */  if (bigend) {    intern->rfd   = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG)		  | ((ext->r_bits[1] & RNDX_BITS1_RFD_BIG)		    		    >> RNDX_BITS1_RFD_SH_BIG);    intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_BIG)		    		    << RNDX_BITS1_INDEX_SH_LEFT_BIG)		  | (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_BIG)		  | (ext->r_bits[3] << RNDX_BITS3_INDEX_SH_LEFT_BIG);  } else {    intern->rfd   = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_LITTLE)		  | ((ext->r_bits[1] & RNDX_BITS1_RFD_LITTLE)		    		    << RNDX_BITS1_RFD_SH_LEFT_LITTLE);    intern->index = ((ext->r_bits[1] & RNDX_BITS1_INDEX_LITTLE)		    		    >> RNDX_BITS1_INDEX_SH_LITTLE)		  | (ext->r_bits[2] << RNDX_BITS2_INDEX_SH_LEFT_LITTLE)		  | ((unsigned int) ext->r_bits[3]		     << RNDX_BITS3_INDEX_SH_LEFT_LITTLE);  }#ifdef TEST  if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    abort();#endif}/* Swap out a relative symbol record.  BIGEND says whether it is in   big-endian or little-endian format.*/void_bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext)     int bigend;     const RNDXR *intern_copy;     struct rndx_ext *ext;{  RNDXR intern[1];  *intern = *intern_copy;	/* Make it reasonable to do in-place.  */    /* now the fun stuff... */  if (bigend) {    ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_BIG;    ext->r_bits[1] = (((intern->rfd << RNDX_BITS1_RFD_SH_BIG)		       & RNDX_BITS1_RFD_BIG)		      | ((intern->index >> RNDX_BITS1_INDEX_SH_LEFT_BIG)			 & RNDX_BITS1_INDEX_BIG));    ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_BIG;    ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_BIG;  } else {    ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_LITTLE;    ext->r_bits[1] = (((intern->rfd >> RNDX_BITS1_RFD_SH_LEFT_LITTLE)		       & RNDX_BITS1_RFD_LITTLE)		      | ((intern->index << RNDX_BITS1_INDEX_SH_LITTLE)			 & RNDX_BITS1_INDEX_LITTLE));    ext->r_bits[2] = intern->index >> RNDX_BITS2_INDEX_SH_LEFT_LITTLE;    ext->r_bits[3] = intern->index >> RNDX_BITS3_INDEX_SH_LEFT_LITTLE;  }#ifdef TEST  if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    abort();#endif}/* The minimum amount of data to allocate.  */#define ALLOC_SIZE (4064)/* Add bytes to a buffer.  Return success.  */static booleanecoff_add_bytes (buf, bufend, need)     char **buf;     char **bufend;     size_t need;{  size_t have;  size_t want;  char *newbuf;  have = *bufend - *buf;  if (have > need)    want = ALLOC_SIZE;  else    {      want = need - have;      if (want < ALLOC_SIZE)	want = ALLOC_SIZE;    }  if (*buf == NULL)    newbuf = (char *) malloc (have + want);  else    newbuf = (char *) realloc (*buf, have + want);  if (newbuf == NULL)    {      bfd_set_error (bfd_error_no_memory);      return false;    }  *buf = newbuf;  *bufend = *buf + have + want;  return true;}/* We keep a hash table which maps strings to numbers.  We use it to   map FDR names to indices in the output file, and to map local   strings when combining stabs debugging information.  */struct string_hash_entry{  struct bfd_hash_entry root;  /* FDR index or string table offset.  */  long val;  /* Next entry in string table.  */  struct string_hash_entry *next;};struct string_hash_table{  struct bfd_hash_table table;};/* Routine to create an entry in a string hash table.  */static struct bfd_hash_entry *string_hash_newfunc (entry, table, string)     struct bfd_hash_entry *entry;     struct bfd_hash_table *table;     const char *string;{  struct string_hash_entry *ret = (struct string_hash_entry *) entry;  /* Allocate the structure if it has not already been allocated by a     subclass.  */  if (ret == (struct string_hash_entry *) NULL)    ret = ((struct string_hash_entry *)	   bfd_hash_allocate (table, sizeof (struct string_hash_entry)));  if (ret == (struct string_hash_entry *) NULL)    {      bfd_set_error (bfd_error_no_memory);      return NULL;    }  /* Call the allocation method of the superclass.  */  ret = ((struct string_hash_entry *)	 bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));  if (ret)    {      /* Initialize the local fields.  */      ret->val = -1;      ret->next = NULL;    }  return (struct bfd_hash_entry *) ret;}