}
aout_adobe_callback (abfd)     bfd *abfd;{  struct internal_exec *execp = exec_hdr (abfd);  asection *sect;  struct external_segdesc ext[1];  char *section_name;  char try_again[30];	/* name and number */  char *newname;  int trynum;  flagword flags;  /* Architecture and machine type -- unknown in this format.  */  bfd_set_arch_mach(abfd, bfd_arch_unknown, 0);  /* The positions of the string table and symbol table.  */  obj_str_filepos (abfd) = N_STROFF (*execp);  obj_sym_filepos (abfd) = N_SYMOFF (*execp);  /* Suck up the section information from the file, one section at a time.  */  for (;;) {    if (bfd_read ((PTR) ext, 1, sizeof (*ext), abfd) != sizeof (*ext)) {      if (bfd_get_error () != bfd_error_system_call)	bfd_set_error (bfd_error_wrong_format);      return 0;    }    switch (ext->e_type[0]) {    case N_TEXT:      section_name = ".text";      flags = SEC_CODE | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;      break;    case N_DATA:      section_name = ".data";      flags = SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS;      break;    case N_BSS:      section_name = ".bss";      flags = SEC_DATA | SEC_HAS_CONTENTS;      break;    case 0:      goto no_more_sections;    default:      (*_bfd_error_handler)	("%s: Unknown section type in a.out.adobe file: %x\n", 	 bfd_get_filename (abfd), ext->e_type[0]);      goto no_more_sections;    }    /* First one is called ".text" or whatever; subsequent ones are       ".text1", ".text2", ... */    bfd_set_error (bfd_error_no_error);    sect = bfd_make_section (abfd, section_name);    trynum = 0;    while (!sect) {      if (bfd_get_error () != bfd_error_no_error)	return 0;	/* Some other error -- slide into the sunset */      sprintf (try_again, "%s%d", section_name, ++trynum);      sect = bfd_make_section (abfd, try_again);    }    /* Fix the name, if it is a sprintf'd name.  */    if (sect->name == try_again) {      newname = (char *) bfd_zalloc(abfd, strlen (sect->name));      if (newname == NULL) {	bfd_set_error (bfd_error_no_memory);	return 0;      }      strcpy (newname, sect->name);      sect->name = newname;    }    /* Now set the section's attributes.  */    bfd_set_section_flags (abfd, sect, flags);    sect->_raw_size = ((ext->e_size[0] << 8)	/* Assumed big-endian */		      | ext->e_size[1] << 8)		      | ext->e_size[2];    sect->_cooked_size = sect->_raw_size;    sect->vma = bfd_h_get_32 (abfd, ext->e_virtbase);    sect->filepos = bfd_h_get_32 (abfd, ext->e_filebase);    /* FIXME XXX alignment? */    /* Set relocation information for first section of each type.  */    if (trynum == 0) switch (ext->e_type[0]) {    case N_TEXT:      sect->rel_filepos = N_TRELOFF (*execp);      sect->reloc_count = execp->a_trsize;      break;    case N_DATA:      sect->rel_filepos = N_DRELOFF (*execp);      sect->reloc_count = execp->a_drsize;      break;    }  }no_more_sections:    adata(abfd).reloc_entry_size = sizeof (struct reloc_std_external);  adata(abfd).symbol_entry_size = sizeof (struct external_nlist);  adata(abfd).page_size = 1; /* Not applicable. */  adata(abfd).segment_size = 1; /* Not applicable. */  adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;  return abfd->xvec;}