Back to index

cell-binutils  2.17cvs20070401
aout-target.h
Go to the documentation of this file.
00001 /* Define a target vector and some small routines for a variant of a.out.
00002    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
00003    2000, 2001, 2002, 2003, 2004, 2005, 2007
00004    Free Software Foundation, Inc.
00005 
00006    This file is part of BFD, the Binary File Descriptor library.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2 of the License, or
00011    (at your option) any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #include "aout/aout64.h"
00023 #include "aout/stab_gnu.h"
00024 #include "aout/ar.h"
00025 /*#include "libaout.h"*/
00026 
00027 #ifndef SEGMENT_SIZE
00028 #define SEGMENT_SIZE TARGET_PAGE_SIZE
00029 #endif
00030 
00031 extern reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
00032 extern reloc_howto_type * NAME (aout, reloc_name_lookup) (bfd *, const char *);
00033 
00034 /* Set parameters about this a.out file that are machine-dependent.
00035    This routine is called from some_aout_object_p just before it returns.  */
00036 #ifndef MY_callback
00037 
00038 static const bfd_target *
00039 MY (callback) (bfd *abfd)
00040 {
00041   struct internal_exec *execp = exec_hdr (abfd);
00042   unsigned int arch_align_power;
00043   unsigned long arch_align;
00044 
00045   /* Calculate the file positions of the parts of a newly read aout header.  */
00046   obj_textsec (abfd)->size = N_TXTSIZE (*execp);
00047 
00048   /* The virtual memory addresses of the sections.  */
00049   obj_textsec (abfd)->vma = N_TXTADDR (*execp);
00050   obj_datasec (abfd)->vma = N_DATADDR (*execp);
00051   obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
00052 
00053   /* For some targets, if the entry point is not in the same page
00054      as the start of the text, then adjust the VMA so that it is.
00055      FIXME: Do this with a macro like SET_ARCH_MACH instead?  */
00056   if (aout_backend_info (abfd)->entry_is_text_address
00057       && execp->a_entry > obj_textsec (abfd)->vma)
00058     {
00059       bfd_vma adjust;
00060 
00061       adjust = execp->a_entry - obj_textsec (abfd)->vma;
00062       /* Adjust only by whole pages.  */
00063       adjust &= ~(TARGET_PAGE_SIZE - 1);
00064       obj_textsec (abfd)->vma += adjust;
00065       obj_datasec (abfd)->vma += adjust;
00066       obj_bsssec (abfd)->vma += adjust;
00067     }
00068 
00069   /* Set the load addresses to be the same as the virtual addresses.  */
00070   obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
00071   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
00072   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
00073 
00074   /* The file offsets of the sections.  */
00075   obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
00076   obj_datasec (abfd)->filepos = N_DATOFF (*execp);
00077 
00078   /* The file offsets of the relocation info.  */
00079   obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
00080   obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
00081 
00082   /* The file offsets of the string table and symbol table.  */
00083   obj_sym_filepos (abfd) = N_SYMOFF (*execp);
00084   obj_str_filepos (abfd) = N_STROFF (*execp);
00085 
00086   /* Determine the architecture and machine type of the object file.  */
00087 #ifdef SET_ARCH_MACH
00088   SET_ARCH_MACH (abfd, *execp);
00089 #else
00090   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
00091 #endif
00092 
00093   /* The number of relocation records.  This must be called after
00094      SET_ARCH_MACH.  It assumes that SET_ARCH_MACH will set
00095      obj_reloc_entry_size correctly, if the reloc size is not
00096      RELOC_STD_SIZE.  */
00097   obj_textsec (abfd)->reloc_count =
00098     execp->a_trsize / obj_reloc_entry_size (abfd);
00099   obj_datasec (abfd)->reloc_count =
00100     execp->a_drsize / obj_reloc_entry_size (abfd);
00101 
00102   /* Now that we know the architecture, set the alignments of the
00103      sections.  This is normally done by NAME (aout,new_section_hook),
00104      but when the initial sections were created the architecture had
00105      not yet been set.  However, for backward compatibility, we don't
00106      set the alignment power any higher than as required by the size
00107      of the section.  */
00108   arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
00109   arch_align = 1 << arch_align_power;
00110   if ((BFD_ALIGN (obj_textsec (abfd)->size, arch_align)
00111        == obj_textsec (abfd)->size)
00112       && (BFD_ALIGN (obj_datasec (abfd)->size, arch_align)
00113          == obj_datasec (abfd)->size)
00114       && (BFD_ALIGN (obj_bsssec (abfd)->size, arch_align)
00115          == obj_bsssec (abfd)->size))
00116     {
00117       obj_textsec (abfd)->alignment_power = arch_align_power;
00118       obj_datasec (abfd)->alignment_power = arch_align_power;
00119       obj_bsssec (abfd)->alignment_power = arch_align_power;
00120     }
00121 
00122   /* Don't set sizes now -- can't be sure until we know arch & mach.
00123      Sizes get set in set_sizes callback, later.  */
00124 
00125   return abfd->xvec;
00126 }
00127 #endif
00128 
00129 #ifndef MY_object_p
00130 /* Finish up the reading of an a.out file header.  */
00131 
00132 static const bfd_target *
00133 MY (object_p) (bfd *abfd)
00134 {
00135   struct external_exec exec_bytes; /* Raw exec header from file.  */
00136   struct internal_exec exec;              /* Cleaned-up exec header.  */
00137   const bfd_target *target;
00138   bfd_size_type amt = EXEC_BYTES_SIZE;
00139 
00140   if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
00141     {
00142       if (bfd_get_error () != bfd_error_system_call)
00143        bfd_set_error (bfd_error_wrong_format);
00144       return 0;
00145     }
00146 
00147 #ifdef SWAP_MAGIC
00148   exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
00149 #else
00150   exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
00151 #endif
00152 
00153   if (N_BADMAG (exec))
00154     return 0;
00155 
00156 #ifdef MACHTYPE_OK
00157   if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
00158     return 0;
00159 #endif
00160 
00161   NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
00162 
00163 #ifdef SWAP_MAGIC
00164   /* Swap_exec_header_in read in a_info with the wrong byte order.  */
00165   exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
00166 #endif
00167 
00168   target = NAME (aout, some_aout_object_p) (abfd, &exec, MY (callback));
00169 
00170 #ifdef ENTRY_CAN_BE_ZERO
00171   /* The NEWSOS3 entry-point is/was 0, which (amongst other lossage)
00172      means that it isn't obvious if EXEC_P should be set.
00173      All of the following must be true for an executable:
00174      There must be no relocations, the bfd can be neither an
00175      archive nor an archive element, and the file must be executable.  */
00176 
00177   if (exec.a_trsize + exec.a_drsize == 0
00178       && bfd_get_format(abfd) == bfd_object && abfd->my_archive == NULL)
00179     {
00180       struct stat buf;
00181 #ifndef S_IXUSR
00182 #define S_IXUSR 0100 /* Execute by owner.  */
00183 #endif
00184       if (stat(abfd->filename, &buf) == 0 && (buf.st_mode & S_IXUSR))
00185        abfd->flags |= EXEC_P;
00186     }
00187 #endif /* ENTRY_CAN_BE_ZERO */
00188 
00189   return target;
00190 }
00191 #define MY_object_p MY (object_p)
00192 #endif
00193 
00194 #ifndef MY_mkobject
00195 
00196 static bfd_boolean
00197 MY (mkobject) (bfd *abfd)
00198 {
00199   return NAME (aout, mkobject (abfd));
00200 }
00201 
00202 #define MY_mkobject MY (mkobject)
00203 #endif
00204 
00205 #ifndef MY_bfd_copy_private_section_data
00206 
00207 /* Copy private section data.  This actually does nothing with the
00208    sections.  It copies the subformat field.  We copy it here, because
00209    we need to know whether this is a QMAGIC file before we set the
00210    section contents, and copy_private_bfd_data is not called until
00211    after the section contents have been set.  */
00212 
00213 static bfd_boolean
00214 MY_bfd_copy_private_section_data (bfd *ibfd,
00215                               asection *isec ATTRIBUTE_UNUSED,
00216                               bfd *obfd,
00217                               asection *osec ATTRIBUTE_UNUSED)
00218 {
00219   if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
00220       && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
00221     obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
00222   return TRUE;
00223 }
00224 
00225 #endif
00226 
00227 /* Write an object file.
00228    Section contents have already been written.  We write the
00229    file header, symbols, and relocation.  */
00230 
00231 #ifndef MY_write_object_contents
00232 
00233 static bfd_boolean
00234 MY (write_object_contents) (bfd *abfd)
00235 {
00236   struct external_exec exec_bytes;
00237   struct internal_exec *execp = exec_hdr (abfd);
00238 
00239   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
00240 
00241   WRITE_HEADERS (abfd, execp);
00242 
00243   return TRUE;
00244 }
00245 #define MY_write_object_contents MY (write_object_contents)
00246 #endif
00247 
00248 #ifndef MY_set_sizes
00249 
00250 static bfd_boolean
00251 MY (set_sizes) (bfd *abfd)
00252 {
00253   adata(abfd).page_size = TARGET_PAGE_SIZE;
00254   adata(abfd).segment_size = SEGMENT_SIZE;
00255 
00256 #ifdef ZMAGIC_DISK_BLOCK_SIZE
00257   adata(abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
00258 #else
00259   adata(abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
00260 #endif
00261 
00262   adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
00263   return TRUE;
00264 }
00265 #define MY_set_sizes MY (set_sizes)
00266 #endif
00267 
00268 #ifndef MY_exec_hdr_flags
00269 #define MY_exec_hdr_flags 0
00270 #endif
00271 
00272 #ifndef MY_backend_data
00273 
00274 #ifndef MY_zmagic_contiguous
00275 #define MY_zmagic_contiguous 0
00276 #endif
00277 #ifndef MY_text_includes_header
00278 #define MY_text_includes_header 0
00279 #endif
00280 #ifndef MY_entry_is_text_address
00281 #define MY_entry_is_text_address 0
00282 #endif
00283 #ifndef MY_exec_header_not_counted
00284 #define MY_exec_header_not_counted 0
00285 #endif
00286 #ifndef MY_add_dynamic_symbols
00287 #define MY_add_dynamic_symbols 0
00288 #endif
00289 #ifndef MY_add_one_symbol
00290 #define MY_add_one_symbol 0
00291 #endif
00292 #ifndef MY_link_dynamic_object
00293 #define MY_link_dynamic_object 0
00294 #endif
00295 #ifndef MY_write_dynamic_symbol
00296 #define MY_write_dynamic_symbol 0
00297 #endif
00298 #ifndef MY_check_dynamic_reloc
00299 #define MY_check_dynamic_reloc 0
00300 #endif
00301 #ifndef MY_finish_dynamic_link
00302 #define MY_finish_dynamic_link 0
00303 #endif
00304 
00305 static const struct aout_backend_data MY (backend_data) =
00306 {
00307   MY_zmagic_contiguous,
00308   MY_text_includes_header,
00309   MY_entry_is_text_address,
00310   MY_exec_hdr_flags,
00311   0,                        /* Text vma?  */
00312   MY_set_sizes,
00313   MY_exec_header_not_counted,
00314   MY_add_dynamic_symbols,
00315   MY_add_one_symbol,
00316   MY_link_dynamic_object,
00317   MY_write_dynamic_symbol,
00318   MY_check_dynamic_reloc,
00319   MY_finish_dynamic_link
00320 };
00321 #define MY_backend_data &MY (backend_data)
00322 #endif
00323 
00324 #ifndef MY_final_link_callback
00325 
00326 /* Callback for the final_link routine to set the section offsets.  */
00327 
00328 static void
00329 MY_final_link_callback (bfd *abfd,
00330                      file_ptr *ptreloff,
00331                      file_ptr *pdreloff,
00332                      file_ptr *psymoff)
00333 {
00334   struct internal_exec *execp = exec_hdr (abfd);
00335 
00336   *ptreloff = N_TRELOFF (*execp);
00337   *pdreloff = N_DRELOFF (*execp);
00338   *psymoff = N_SYMOFF (*execp);
00339 }
00340 
00341 #endif
00342 
00343 #ifndef MY_bfd_final_link
00344 
00345 /* Final link routine.  We need to use a call back to get the correct
00346    offsets in the output file.  */
00347 
00348 static bfd_boolean
00349 MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
00350 {
00351   return NAME (aout, final_link) (abfd, info, MY_final_link_callback);
00352 }
00353 
00354 #endif
00355 
00356 /* We assume BFD generic archive files.  */
00357 #ifndef       MY_openr_next_archived_file
00358 #define       MY_openr_next_archived_file bfd_generic_openr_next_archived_file
00359 #endif
00360 #ifndef MY_get_elt_at_index
00361 #define MY_get_elt_at_index        _bfd_generic_get_elt_at_index
00362 #endif
00363 #ifndef       MY_generic_stat_arch_elt
00364 #define       MY_generic_stat_arch_elt    bfd_generic_stat_arch_elt
00365 #endif
00366 #ifndef       MY_slurp_armap
00367 #define       MY_slurp_armap                     bfd_slurp_bsd_armap
00368 #endif
00369 #ifndef       MY_slurp_extended_name_table
00370 #define       MY_slurp_extended_name_table       _bfd_slurp_extended_name_table
00371 #endif
00372 #ifndef MY_construct_extended_name_table
00373 #define MY_construct_extended_name_table \
00374   _bfd_archive_bsd_construct_extended_name_table
00375 #endif
00376 #ifndef       MY_write_armap
00377 #define       MY_write_armap              bsd_write_armap
00378 #endif
00379 #ifndef MY_read_ar_hdr
00380 #define MY_read_ar_hdr             _bfd_generic_read_ar_hdr
00381 #endif
00382 #ifndef       MY_truncate_arname
00383 #define       MY_truncate_arname          bfd_bsd_truncate_arname
00384 #endif
00385 #ifndef MY_update_armap_timestamp
00386 #define MY_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
00387 #endif
00388 
00389 /* No core file defined here -- configure in trad-core.c separately.  */
00390 #ifndef       MY_core_file_failing_command
00391 #define       MY_core_file_failing_command _bfd_nocore_core_file_failing_command
00392 #endif
00393 #ifndef       MY_core_file_failing_signal
00394 #define       MY_core_file_failing_signal _bfd_nocore_core_file_failing_signal
00395 #endif
00396 #ifndef       MY_core_file_matches_executable_p
00397 #define       MY_core_file_matches_executable_p  \
00398                             _bfd_nocore_core_file_matches_executable_p
00399 #endif
00400 #ifndef       MY_core_file_p
00401 #define       MY_core_file_p              _bfd_dummy_target
00402 #endif
00403 
00404 #ifndef MY_bfd_debug_info_start
00405 #define MY_bfd_debug_info_start           bfd_void
00406 #endif
00407 #ifndef MY_bfd_debug_info_end
00408 #define MY_bfd_debug_info_end             bfd_void
00409 #endif
00410 #ifndef MY_bfd_debug_info_accumulate
00411 #define MY_bfd_debug_info_accumulate      \
00412               (void (*) (bfd *, struct bfd_section *)) bfd_void
00413 #endif
00414 
00415 #ifndef MY_core_file_failing_command
00416 #define MY_core_file_failing_command NAME (aout, core_file_failing_command)
00417 #endif
00418 #ifndef MY_core_file_failing_signal
00419 #define MY_core_file_failing_signal NAME (aout, core_file_failing_signal)
00420 #endif
00421 #ifndef MY_core_file_matches_executable_p
00422 #define MY_core_file_matches_executable_p NAME (aout, core_file_matches_executable_p)
00423 #endif
00424 #ifndef MY_set_section_contents
00425 #define MY_set_section_contents NAME (aout, set_section_contents)
00426 #endif
00427 #ifndef MY_get_section_contents
00428 #define MY_get_section_contents NAME (aout, get_section_contents)
00429 #endif
00430 #ifndef MY_get_section_contents_in_window
00431 #define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
00432 #endif
00433 #ifndef MY_new_section_hook
00434 #define MY_new_section_hook NAME (aout, new_section_hook)
00435 #endif
00436 #ifndef MY_get_symtab_upper_bound
00437 #define MY_get_symtab_upper_bound NAME (aout, get_symtab_upper_bound)
00438 #endif
00439 #ifndef MY_canonicalize_symtab
00440 #define MY_canonicalize_symtab NAME (aout, canonicalize_symtab)
00441 #endif
00442 #ifndef MY_get_reloc_upper_bound
00443 #define MY_get_reloc_upper_bound NAME (aout,get_reloc_upper_bound)
00444 #endif
00445 #ifndef MY_canonicalize_reloc
00446 #define MY_canonicalize_reloc NAME (aout, canonicalize_reloc)
00447 #endif
00448 #ifndef MY_make_empty_symbol
00449 #define MY_make_empty_symbol NAME (aout, make_empty_symbol)
00450 #endif
00451 #ifndef MY_print_symbol
00452 #define MY_print_symbol NAME (aout, print_symbol)
00453 #endif
00454 #ifndef MY_get_symbol_info
00455 #define MY_get_symbol_info NAME (aout, get_symbol_info)
00456 #endif
00457 #ifndef MY_get_lineno
00458 #define MY_get_lineno NAME (aout, get_lineno)
00459 #endif
00460 #ifndef MY_set_arch_mach
00461 #define MY_set_arch_mach NAME (aout, set_arch_mach)
00462 #endif
00463 #ifndef MY_find_nearest_line
00464 #define MY_find_nearest_line NAME (aout, find_nearest_line)
00465 #endif
00466 #ifndef MY_find_inliner_info
00467 #define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
00468 #endif
00469 #ifndef MY_sizeof_headers
00470 #define MY_sizeof_headers NAME (aout, sizeof_headers)
00471 #endif
00472 #ifndef MY_bfd_get_relocated_section_contents
00473 #define MY_bfd_get_relocated_section_contents \
00474                      bfd_generic_get_relocated_section_contents
00475 #endif
00476 #ifndef MY_bfd_relax_section
00477 #define MY_bfd_relax_section bfd_generic_relax_section
00478 #endif
00479 #ifndef MY_bfd_gc_sections
00480 #define MY_bfd_gc_sections bfd_generic_gc_sections
00481 #endif
00482 #ifndef MY_bfd_merge_sections
00483 #define MY_bfd_merge_sections bfd_generic_merge_sections
00484 #endif
00485 #ifndef MY_bfd_is_group_section
00486 #define MY_bfd_is_group_section bfd_generic_is_group_section
00487 #endif
00488 #ifndef MY_bfd_discard_group
00489 #define MY_bfd_discard_group bfd_generic_discard_group
00490 #endif
00491 #ifndef MY_section_already_linked
00492 #define MY_section_already_linked \
00493   _bfd_generic_section_already_linked
00494 #endif
00495 #ifndef MY_bfd_reloc_type_lookup
00496 #define MY_bfd_reloc_type_lookup NAME (aout, reloc_type_lookup)
00497 #endif
00498 #ifndef MY_bfd_reloc_name_lookup
00499 #define MY_bfd_reloc_name_lookup NAME (aout, reloc_name_lookup)
00500 #endif
00501 #ifndef MY_bfd_make_debug_symbol
00502 #define MY_bfd_make_debug_symbol 0
00503 #endif
00504 #ifndef MY_read_minisymbols
00505 #define MY_read_minisymbols NAME (aout, read_minisymbols)
00506 #endif
00507 #ifndef MY_minisymbol_to_symbol
00508 #define MY_minisymbol_to_symbol NAME (aout, minisymbol_to_symbol)
00509 #endif
00510 #ifndef MY_bfd_link_hash_table_create
00511 #define MY_bfd_link_hash_table_create NAME (aout, link_hash_table_create)
00512 #endif
00513 #ifndef MY_bfd_link_hash_table_free
00514 #define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
00515 #endif
00516 #ifndef MY_bfd_link_add_symbols
00517 #define MY_bfd_link_add_symbols NAME (aout, link_add_symbols)
00518 #endif
00519 #ifndef MY_bfd_link_just_syms
00520 #define MY_bfd_link_just_syms _bfd_generic_link_just_syms
00521 #endif
00522 #ifndef MY_bfd_link_split_section
00523 #define MY_bfd_link_split_section  _bfd_generic_link_split_section
00524 #endif
00525 
00526 #ifndef MY_bfd_copy_private_bfd_data
00527 #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
00528 #endif
00529 
00530 #ifndef MY_bfd_merge_private_bfd_data
00531 #define MY_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
00532 #endif
00533 
00534 #ifndef MY_bfd_copy_private_symbol_data
00535 #define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
00536 #endif
00537 
00538 #ifndef MY_bfd_copy_private_header_data
00539 #define MY_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
00540 #endif
00541 
00542 #ifndef MY_bfd_print_private_bfd_data
00543 #define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
00544 #endif
00545 
00546 #ifndef MY_bfd_set_private_flags
00547 #define MY_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
00548 #endif
00549 
00550 #ifndef MY_bfd_is_local_label_name
00551 #define MY_bfd_is_local_label_name bfd_generic_is_local_label_name
00552 #endif
00553 
00554 #ifndef MY_bfd_is_target_special_symbol
00555 #define MY_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
00556 #endif
00557 
00558 #ifndef MY_bfd_free_cached_info
00559 #define MY_bfd_free_cached_info NAME (aout, bfd_free_cached_info)
00560 #endif
00561 
00562 #ifndef MY_close_and_cleanup
00563 #define MY_close_and_cleanup MY_bfd_free_cached_info
00564 #endif
00565 
00566 #ifndef MY_get_dynamic_symtab_upper_bound
00567 #define MY_get_dynamic_symtab_upper_bound \
00568   _bfd_nodynamic_get_dynamic_symtab_upper_bound
00569 #endif
00570 #ifndef MY_canonicalize_dynamic_symtab
00571 #define MY_canonicalize_dynamic_symtab \
00572   _bfd_nodynamic_canonicalize_dynamic_symtab
00573 #endif
00574 #ifndef MY_get_synthetic_symtab
00575 #define MY_get_synthetic_symtab \
00576   _bfd_nodynamic_get_synthetic_symtab
00577 #endif
00578 #ifndef MY_get_dynamic_reloc_upper_bound
00579 #define MY_get_dynamic_reloc_upper_bound \
00580   _bfd_nodynamic_get_dynamic_reloc_upper_bound
00581 #endif
00582 #ifndef MY_canonicalize_dynamic_reloc
00583 #define MY_canonicalize_dynamic_reloc \
00584   _bfd_nodynamic_canonicalize_dynamic_reloc
00585 #endif
00586 
00587 /* Aout symbols normally have leading underscores.  */
00588 #ifndef MY_symbol_leading_char
00589 #define MY_symbol_leading_char '_'
00590 #endif
00591 
00592 /* Aout archives normally use spaces for padding.  */
00593 #ifndef AR_PAD_CHAR
00594 #define AR_PAD_CHAR ' '
00595 #endif
00596 
00597 #ifndef MY_BFD_TARGET
00598 const bfd_target MY (vec) =
00599 {
00600   TARGETNAME,               /* Name.  */
00601   bfd_target_aout_flavour,
00602 #ifdef TARGET_IS_BIG_ENDIAN_P
00603   BFD_ENDIAN_BIG,           /* Target byte order (big).  */
00604   BFD_ENDIAN_BIG,           /* Target headers byte order (big).  */
00605 #else
00606   BFD_ENDIAN_LITTLE,        /* Target byte order (little).  */
00607   BFD_ENDIAN_LITTLE,        /* Target headers byte order (little).  */
00608 #endif
00609   (HAS_RELOC | EXEC_P |            /* Object flags.  */
00610    HAS_LINENO | HAS_DEBUG |
00611    HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
00612   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
00613   MY_symbol_leading_char,
00614   AR_PAD_CHAR,                     /* AR_pad_char.  */
00615   15,                       /* AR_max_namelen.  */
00616 #ifdef TARGET_IS_BIG_ENDIAN_P
00617   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
00618      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
00619      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data.  */
00620   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
00621      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
00622      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers.  */
00623 #else
00624   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
00625      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
00626      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data.  */
00627   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
00628      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
00629      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers.  */
00630 #endif
00631     {_bfd_dummy_target, MY_object_p,             /* bfd_check_format.  */
00632        bfd_generic_archive_p, MY_core_file_p},
00633     {bfd_false, MY_mkobject,                     /* bfd_set_format.  */
00634        _bfd_generic_mkarchive, bfd_false},
00635     {bfd_false, MY_write_object_contents,        /* bfd_write_contents.  */
00636        _bfd_write_archive_contents, bfd_false},
00637 
00638      BFD_JUMP_TABLE_GENERIC (MY),
00639      BFD_JUMP_TABLE_COPY (MY),
00640      BFD_JUMP_TABLE_CORE (MY),
00641      BFD_JUMP_TABLE_ARCHIVE (MY),
00642      BFD_JUMP_TABLE_SYMBOLS (MY),
00643      BFD_JUMP_TABLE_RELOCS (MY),
00644      BFD_JUMP_TABLE_WRITE (MY),
00645      BFD_JUMP_TABLE_LINK (MY),
00646      BFD_JUMP_TABLE_DYNAMIC (MY),
00647 
00648   /* Alternative_target.  */
00649   NULL,
00650 
00651   MY_backend_data
00652 };
00653 #endif /* MY_BFD_TARGET */