- obj_reloc_entry_size (abfd) = sizeof (struct relocation_info);
- return abfd->xvec;
-}
-
-
-boolean
-DEFUN(NAME(host_aout,mkobject), (abfd),
- bfd *abfd)
-{
- /* This struct is just for allocating two things with one zalloc, so
- they will be freed together, without violating alignment constraints. */
- struct aout_exec {
- struct aoutdata aoutdata;
- struct exec exec;
- } *rawptr;
-
- bfd_error = system_call_error;
-
- /* Use an intermediate variable for clarity */
- rawptr = (struct aout_exec *)bfd_zalloc (abfd, sizeof (struct aout_exec));
-
- if (rawptr == NULL) {
- bfd_error = no_memory;
- return false;
- }
-
- set_tdata (abfd, &rawptr->aoutdata);
- /* exec_hdr (abfd), a "struct internal_exec *", is just an abstraction,
- as far as the BFD a.out layer cares. We use it as a "struct exec *". */
- exec_hdr (abfd) = (struct internal_exec *) &rawptr->exec;
-
- /* For simplicity's sake we just make all the sections right here. */
-
- obj_textsec (abfd) = (asection *)NULL;
- obj_datasec (abfd) = (asection *)NULL;
- obj_bsssec (abfd) = (asection *)NULL;
- bfd_make_section (abfd, ".text");
- bfd_make_section (abfd, ".data");
- bfd_make_section (abfd, ".bss");
-
- return true;
-}
-
-/* Write an object file in host a.out format.
- Section contents have already been written. We write the
- file header, symbols, and relocation. */
-
-boolean
-DEFUN(NAME(host_aout,write_object_contents), (abfd),
- bfd *abfd)
-{
-/* This works because we are on the host system */
-#define EXEC_BYTES_SIZE (sizeof (struct exec))
-#define EXTERNAL_LIST_SIZE (sizeof (struct nlist))
- size_t data_pad = 0;
- unsigned char exec_bytes[EXEC_BYTES_SIZE];
- struct exec *execp = (struct exec *)exec_hdr (abfd);
-
- execp->a_text = obj_textsec (abfd)->size;
-
- WRITE_HEADERS (abfd, execp);
- return true;
-}
-\f
-/* We use BFD generic archive files. */
-#define aout_32_openr_next_archived_file bfd_generic_openr_next_archived_file
-#define aout_32_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define aout_32_slurp_armap bfd_slurp_bsd_armap
-#define aout_32_slurp_extended_name_table bfd_true
-#define aout_32_write_armap bsd_write_armap
-#define aout_32_truncate_arname bfd_bsd_truncate_arname
-/* #define aout_32_machine_type sunos_machine_type */
-
-/* Traditional Unix core files with upage */
-#define aout_32_core_file_failing_command trad_unix_core_file_failing_command
-#define aout_32_core_file_failing_signal trad_unix_core_file_failing_signal
-#define aout_32_core_file_matches_executable_p trad_unix_core_file_matches_executable_p
-
-
-#define aout_64_openr_next_archived_file bfd_generic_openr_next_archived_file
-#define aout_64_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define aout_64_slurp_armap bfd_slurp_bsd_armap
-#define aout_64_slurp_extended_name_table bfd_true
-#define aout_64_write_armap bsd_write_armap
-#define aout_64_truncate_arname bfd_bsd_truncate_arname
-/* #define aout_64_machine_type sunos_machine_type */
-
-#define aout_64_core_file_failing_command trad_unix_core_file_failing_command
-#define aout_64_core_file_failing_signal trad_unix_core_file_failing_signal
-#define aout_64_core_file_matches_executable_p trad_unix_core_file_matches_executable_p
-
-#define aout_64_bfd_debug_info_start bfd_void
-#define aout_64_bfd_debug_info_end bfd_void
-#define aout_64_bfd_debug_info_accumulate bfd_void
-
-#define aout_32_bfd_debug_info_start bfd_void
-#define aout_32_bfd_debug_info_end bfd_void
-#define aout_32_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
-
-
-/* We implement these routines ourselves, rather than using the generic
- a.out versions. */
-#define aout_write_object_contents host_write_object_contents
-
-bfd_target host_aout_big_vec =
- {
- "a.out-host-big",
- bfd_target_aout_flavour_enum,
- true, /* target byte order */
- true, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
- 3, /* minimum alignment power */
- _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* data */
- _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs */
-
- {_bfd_dummy_target, NAME(host_aout,object_p),
- bfd_generic_archive_p, trad_unix_core_file_p},
- {bfd_false, NAME(host_aout,mkobject),
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, NAME(host_aout,write_object_contents), /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- JUMP_TABLE(JNAME(aout))
-};