-#if 0
-struct bout_data_struct
-{
- struct aoutdata a;
- struct internal_exec e;
-};
-
-static boolean
-os9k_mkobject (abfd)
- bfd *abfd;
-{
- struct bout_data_struct *rawptr;
-
- rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, sizeof (struct bout_data_struct));
- if (rawptr == NULL)
- return false;
-
- abfd->tdata.bout_data = rawptr;
- exec_hdr (abfd) = &rawptr->e;
-
- obj_textsec (abfd) = (asection *) NULL;
- obj_datasec (abfd) = (asection *) NULL;
- obj_bsssec (abfd) = (asection *) NULL;
-
- return true;
-}
-
-static boolean
-os9k_write_object_contents (abfd)
- bfd *abfd;
-{
- struct external_exec swapped_hdr;
-
- if (! aout_32_make_sections (abfd))
- return false;
-
- exec_hdr (abfd)->a_info = BMAGIC;
-
- exec_hdr (abfd)->a_text = obj_textsec (abfd)->_raw_size;
- exec_hdr (abfd)->a_data = obj_datasec (abfd)->_raw_size;
- exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->_raw_size;
- exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * sizeof (struct nlist);
- exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
- exec_hdr (abfd)->a_trsize = ((obj_textsec (abfd)->reloc_count) *
- sizeof (struct relocation_info));
- exec_hdr (abfd)->a_drsize = ((obj_datasec (abfd)->reloc_count) *
- sizeof (struct relocation_info));
-
- exec_hdr (abfd)->a_talign = obj_textsec (abfd)->alignment_power;
- exec_hdr (abfd)->a_dalign = obj_datasec (abfd)->alignment_power;
- exec_hdr (abfd)->a_balign = obj_bsssec (abfd)->alignment_power;
-
- exec_hdr (abfd)->a_tload = obj_textsec (abfd)->vma;
- exec_hdr (abfd)->a_dload = obj_datasec (abfd)->vma;
-
- bout_swap_exec_header_out (abfd, exec_hdr (abfd), &swapped_hdr);
-
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_write ((PTR) & swapped_hdr, 1, EXEC_BYTES_SIZE, abfd)
- != EXEC_BYTES_SIZE))
- return false;
-
- /* Now write out reloc info, followed by syms and strings */
- if (bfd_get_symcount (abfd) != 0)
- {
- if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
- != 0)
- return false;
-
- if (!aout_32_write_syms (abfd))
- return false;
-
- if (bfd_seek (abfd, (file_ptr) (N_TROFF (*exec_hdr (abfd))), SEEK_SET)
- != 0)
- return false;
-
- if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd)))
- return false;
- if (bfd_seek (abfd, (file_ptr) (N_DROFF (*exec_hdr (abfd))), SEEK_SET)
- != 0)
- return false;
-
- if (!b_out_squirt_out_relocs (abfd, obj_datasec (abfd)))
- return false;
- }
- return true;
-}
-\f
-static boolean
-os9k_set_section_contents (abfd, section, location, offset, count)
- bfd *abfd;
- sec_ptr section;
- unsigned char *location;
- file_ptr offset;
- int count;
-{
-
- if (abfd->output_has_begun == false)
- { /* set by bfd.c handler */
- if (! aout_32_make_sections (abfd))
- return false;
-
- obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
- obj_datasec (abfd)->filepos = obj_textsec (abfd)->filepos
- + obj_textsec (abfd)->_raw_size;
-
- }
- /* regardless, once we know what we're doing, we might as well get going */
- if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
- return false;
-
- if (count != 0)
- {
- return (bfd_write ((PTR) location, 1, count, abfd) == count) ? true : false;
- }
- return true;
-}
-#endif /* 0 */
-