daily update
[binutils.git] / bfd / aout-target.h
blob5a30eda74142e26d7bd4808cf9928d3e753a0769
1 /* Define a target vector and some small routines for a variant of a.out.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005
4 Free Software Foundation, Inc.
6 This file is part of BFD, the Binary File Descriptor library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
22 #include "aout/aout64.h"
23 #include "aout/stab_gnu.h"
24 #include "aout/ar.h"
25 /*#include "libaout.h"*/
27 #ifndef SEGMENT_SIZE
28 #define SEGMENT_SIZE TARGET_PAGE_SIZE
29 #endif
31 extern reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
33 /* Set parameters about this a.out file that are machine-dependent.
34 This routine is called from some_aout_object_p just before it returns. */
35 #ifndef MY_callback
37 static const bfd_target *
38 MY (callback) (bfd *abfd)
40 struct internal_exec *execp = exec_hdr (abfd);
41 unsigned int arch_align_power;
42 unsigned long arch_align;
44 /* Calculate the file positions of the parts of a newly read aout header. */
45 obj_textsec (abfd)->size = N_TXTSIZE (*execp);
47 /* The virtual memory addresses of the sections. */
48 obj_textsec (abfd)->vma = N_TXTADDR (*execp);
49 obj_datasec (abfd)->vma = N_DATADDR (*execp);
50 obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
52 /* For some targets, if the entry point is not in the same page
53 as the start of the text, then adjust the VMA so that it is.
54 FIXME: Do this with a macro like SET_ARCH_MACH instead? */
55 if (aout_backend_info (abfd)->entry_is_text_address
56 && execp->a_entry > obj_textsec (abfd)->vma)
58 bfd_vma adjust;
60 adjust = execp->a_entry - obj_textsec (abfd)->vma;
61 /* Adjust only by whole pages. */
62 adjust &= ~(TARGET_PAGE_SIZE - 1);
63 obj_textsec (abfd)->vma += adjust;
64 obj_datasec (abfd)->vma += adjust;
65 obj_bsssec (abfd)->vma += adjust;
68 /* Set the load addresses to be the same as the virtual addresses. */
69 obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
70 obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
71 obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
73 /* The file offsets of the sections. */
74 obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
75 obj_datasec (abfd)->filepos = N_DATOFF (*execp);
77 /* The file offsets of the relocation info. */
78 obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
79 obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
81 /* The file offsets of the string table and symbol table. */
82 obj_sym_filepos (abfd) = N_SYMOFF (*execp);
83 obj_str_filepos (abfd) = N_STROFF (*execp);
85 /* Determine the architecture and machine type of the object file. */
86 #ifdef SET_ARCH_MACH
87 SET_ARCH_MACH (abfd, *execp);
88 #else
89 bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
90 #endif
92 /* The number of relocation records. This must be called after
93 SET_ARCH_MACH. It assumes that SET_ARCH_MACH will set
94 obj_reloc_entry_size correctly, if the reloc size is not
95 RELOC_STD_SIZE. */
96 obj_textsec (abfd)->reloc_count =
97 execp->a_trsize / obj_reloc_entry_size (abfd);
98 obj_datasec (abfd)->reloc_count =
99 execp->a_drsize / obj_reloc_entry_size (abfd);
101 /* Now that we know the architecture, set the alignments of the
102 sections. This is normally done by NAME (aout,new_section_hook),
103 but when the initial sections were created the architecture had
104 not yet been set. However, for backward compatibility, we don't
105 set the alignment power any higher than as required by the size
106 of the section. */
107 arch_align_power = bfd_get_arch_info (abfd)->section_align_power;
108 arch_align = 1 << arch_align_power;
109 if ((BFD_ALIGN (obj_textsec (abfd)->size, arch_align)
110 == obj_textsec (abfd)->size)
111 && (BFD_ALIGN (obj_datasec (abfd)->size, arch_align)
112 == obj_datasec (abfd)->size)
113 && (BFD_ALIGN (obj_bsssec (abfd)->size, arch_align)
114 == obj_bsssec (abfd)->size))
116 obj_textsec (abfd)->alignment_power = arch_align_power;
117 obj_datasec (abfd)->alignment_power = arch_align_power;
118 obj_bsssec (abfd)->alignment_power = arch_align_power;
121 /* Don't set sizes now -- can't be sure until we know arch & mach.
122 Sizes get set in set_sizes callback, later. */
124 return abfd->xvec;
126 #endif
128 #ifndef MY_object_p
129 /* Finish up the reading of an a.out file header. */
131 static const bfd_target *
132 MY (object_p) (bfd *abfd)
134 struct external_exec exec_bytes; /* Raw exec header from file. */
135 struct internal_exec exec; /* Cleaned-up exec header. */
136 const bfd_target *target;
137 bfd_size_type amt = EXEC_BYTES_SIZE;
139 if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
141 if (bfd_get_error () != bfd_error_system_call)
142 bfd_set_error (bfd_error_wrong_format);
143 return 0;
146 #ifdef SWAP_MAGIC
147 exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
148 #else
149 exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
150 #endif
152 if (N_BADMAG (exec))
153 return 0;
155 #ifdef MACHTYPE_OK
156 if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
157 return 0;
158 #endif
160 NAME (aout, swap_exec_header_in) (abfd, &exec_bytes, &exec);
162 #ifdef SWAP_MAGIC
163 /* Swap_exec_header_in read in a_info with the wrong byte order. */
164 exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
165 #endif
167 target = NAME (aout, some_aout_object_p) (abfd, &exec, MY (callback));
169 #ifdef ENTRY_CAN_BE_ZERO
170 /* The NEWSOS3 entry-point is/was 0, which (amongst other lossage)
171 means that it isn't obvious if EXEC_P should be set.
172 All of the following must be true for an executable:
173 There must be no relocations, the bfd can be neither an
174 archive nor an archive element, and the file must be executable. */
176 if (exec.a_trsize + exec.a_drsize == 0
177 && bfd_get_format(abfd) == bfd_object && abfd->my_archive == NULL)
179 struct stat buf;
180 #ifndef S_IXUSR
181 #define S_IXUSR 0100 /* Execute by owner. */
182 #endif
183 if (stat(abfd->filename, &buf) == 0 && (buf.st_mode & S_IXUSR))
184 abfd->flags |= EXEC_P;
186 #endif /* ENTRY_CAN_BE_ZERO */
188 return target;
190 #define MY_object_p MY (object_p)
191 #endif
193 #ifndef MY_mkobject
195 static bfd_boolean
196 MY (mkobject) (bfd *abfd)
198 return NAME (aout, mkobject (abfd));
201 #define MY_mkobject MY (mkobject)
202 #endif
204 #ifndef MY_bfd_copy_private_section_data
206 /* Copy private section data. This actually does nothing with the
207 sections. It copies the subformat field. We copy it here, because
208 we need to know whether this is a QMAGIC file before we set the
209 section contents, and copy_private_bfd_data is not called until
210 after the section contents have been set. */
212 static bfd_boolean
213 MY_bfd_copy_private_section_data (bfd *ibfd,
214 asection *isec ATTRIBUTE_UNUSED,
215 bfd *obfd,
216 asection *osec ATTRIBUTE_UNUSED)
218 if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
219 && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
220 obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
221 return TRUE;
224 #endif
226 /* Write an object file.
227 Section contents have already been written. We write the
228 file header, symbols, and relocation. */
230 #ifndef MY_write_object_contents
232 static bfd_boolean
233 MY (write_object_contents) (bfd *abfd)
235 struct external_exec exec_bytes;
236 struct internal_exec *execp = exec_hdr (abfd);
238 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
240 WRITE_HEADERS (abfd, execp);
242 return TRUE;
244 #define MY_write_object_contents MY (write_object_contents)
245 #endif
247 #ifndef MY_set_sizes
249 static bfd_boolean
250 MY (set_sizes) (bfd *abfd)
252 adata(abfd).page_size = TARGET_PAGE_SIZE;
253 adata(abfd).segment_size = SEGMENT_SIZE;
255 #ifdef ZMAGIC_DISK_BLOCK_SIZE
256 adata(abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
257 #else
258 adata(abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
259 #endif
261 adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
262 return TRUE;
264 #define MY_set_sizes MY (set_sizes)
265 #endif
267 #ifndef MY_exec_hdr_flags
268 #define MY_exec_hdr_flags 0
269 #endif
271 #ifndef MY_backend_data
273 #ifndef MY_zmagic_contiguous
274 #define MY_zmagic_contiguous 0
275 #endif
276 #ifndef MY_text_includes_header
277 #define MY_text_includes_header 0
278 #endif
279 #ifndef MY_entry_is_text_address
280 #define MY_entry_is_text_address 0
281 #endif
282 #ifndef MY_exec_header_not_counted
283 #define MY_exec_header_not_counted 0
284 #endif
285 #ifndef MY_add_dynamic_symbols
286 #define MY_add_dynamic_symbols 0
287 #endif
288 #ifndef MY_add_one_symbol
289 #define MY_add_one_symbol 0
290 #endif
291 #ifndef MY_link_dynamic_object
292 #define MY_link_dynamic_object 0
293 #endif
294 #ifndef MY_write_dynamic_symbol
295 #define MY_write_dynamic_symbol 0
296 #endif
297 #ifndef MY_check_dynamic_reloc
298 #define MY_check_dynamic_reloc 0
299 #endif
300 #ifndef MY_finish_dynamic_link
301 #define MY_finish_dynamic_link 0
302 #endif
304 static const struct aout_backend_data MY (backend_data) =
306 MY_zmagic_contiguous,
307 MY_text_includes_header,
308 MY_entry_is_text_address,
309 MY_exec_hdr_flags,
310 0, /* Text vma? */
311 MY_set_sizes,
312 MY_exec_header_not_counted,
313 MY_add_dynamic_symbols,
314 MY_add_one_symbol,
315 MY_link_dynamic_object,
316 MY_write_dynamic_symbol,
317 MY_check_dynamic_reloc,
318 MY_finish_dynamic_link
320 #define MY_backend_data &MY (backend_data)
321 #endif
323 #ifndef MY_final_link_callback
325 /* Callback for the final_link routine to set the section offsets. */
327 static void
328 MY_final_link_callback (bfd *abfd,
329 file_ptr *ptreloff,
330 file_ptr *pdreloff,
331 file_ptr *psymoff)
333 struct internal_exec *execp = exec_hdr (abfd);
335 *ptreloff = N_TRELOFF (*execp);
336 *pdreloff = N_DRELOFF (*execp);
337 *psymoff = N_SYMOFF (*execp);
340 #endif
342 #ifndef MY_bfd_final_link
344 /* Final link routine. We need to use a call back to get the correct
345 offsets in the output file. */
347 static bfd_boolean
348 MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
350 return NAME (aout, final_link) (abfd, info, MY_final_link_callback);
353 #endif
355 /* We assume BFD generic archive files. */
356 #ifndef MY_openr_next_archived_file
357 #define MY_openr_next_archived_file bfd_generic_openr_next_archived_file
358 #endif
359 #ifndef MY_get_elt_at_index
360 #define MY_get_elt_at_index _bfd_generic_get_elt_at_index
361 #endif
362 #ifndef MY_generic_stat_arch_elt
363 #define MY_generic_stat_arch_elt bfd_generic_stat_arch_elt
364 #endif
365 #ifndef MY_slurp_armap
366 #define MY_slurp_armap bfd_slurp_bsd_armap
367 #endif
368 #ifndef MY_slurp_extended_name_table
369 #define MY_slurp_extended_name_table _bfd_slurp_extended_name_table
370 #endif
371 #ifndef MY_construct_extended_name_table
372 #define MY_construct_extended_name_table \
373 _bfd_archive_bsd_construct_extended_name_table
374 #endif
375 #ifndef MY_write_armap
376 #define MY_write_armap bsd_write_armap
377 #endif
378 #ifndef MY_read_ar_hdr
379 #define MY_read_ar_hdr _bfd_generic_read_ar_hdr
380 #endif
381 #ifndef MY_truncate_arname
382 #define MY_truncate_arname bfd_bsd_truncate_arname
383 #endif
384 #ifndef MY_update_armap_timestamp
385 #define MY_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
386 #endif
388 /* No core file defined here -- configure in trad-core.c separately. */
389 #ifndef MY_core_file_failing_command
390 #define MY_core_file_failing_command _bfd_nocore_core_file_failing_command
391 #endif
392 #ifndef MY_core_file_failing_signal
393 #define MY_core_file_failing_signal _bfd_nocore_core_file_failing_signal
394 #endif
395 #ifndef MY_core_file_matches_executable_p
396 #define MY_core_file_matches_executable_p \
397 _bfd_nocore_core_file_matches_executable_p
398 #endif
399 #ifndef MY_core_file_p
400 #define MY_core_file_p _bfd_dummy_target
401 #endif
403 #ifndef MY_bfd_debug_info_start
404 #define MY_bfd_debug_info_start bfd_void
405 #endif
406 #ifndef MY_bfd_debug_info_end
407 #define MY_bfd_debug_info_end bfd_void
408 #endif
409 #ifndef MY_bfd_debug_info_accumulate
410 #define MY_bfd_debug_info_accumulate \
411 (void (*) (bfd *, struct bfd_section *)) bfd_void
412 #endif
414 #ifndef MY_core_file_failing_command
415 #define MY_core_file_failing_command NAME (aout, core_file_failing_command)
416 #endif
417 #ifndef MY_core_file_failing_signal
418 #define MY_core_file_failing_signal NAME (aout, core_file_failing_signal)
419 #endif
420 #ifndef MY_core_file_matches_executable_p
421 #define MY_core_file_matches_executable_p NAME (aout, core_file_matches_executable_p)
422 #endif
423 #ifndef MY_set_section_contents
424 #define MY_set_section_contents NAME (aout, set_section_contents)
425 #endif
426 #ifndef MY_get_section_contents
427 #define MY_get_section_contents NAME (aout, get_section_contents)
428 #endif
429 #ifndef MY_get_section_contents_in_window
430 #define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
431 #endif
432 #ifndef MY_new_section_hook
433 #define MY_new_section_hook NAME (aout, new_section_hook)
434 #endif
435 #ifndef MY_get_symtab_upper_bound
436 #define MY_get_symtab_upper_bound NAME (aout, get_symtab_upper_bound)
437 #endif
438 #ifndef MY_canonicalize_symtab
439 #define MY_canonicalize_symtab NAME (aout, canonicalize_symtab)
440 #endif
441 #ifndef MY_get_reloc_upper_bound
442 #define MY_get_reloc_upper_bound NAME (aout,get_reloc_upper_bound)
443 #endif
444 #ifndef MY_canonicalize_reloc
445 #define MY_canonicalize_reloc NAME (aout, canonicalize_reloc)
446 #endif
447 #ifndef MY_make_empty_symbol
448 #define MY_make_empty_symbol NAME (aout, make_empty_symbol)
449 #endif
450 #ifndef MY_print_symbol
451 #define MY_print_symbol NAME (aout, print_symbol)
452 #endif
453 #ifndef MY_get_symbol_info
454 #define MY_get_symbol_info NAME (aout, get_symbol_info)
455 #endif
456 #ifndef MY_get_lineno
457 #define MY_get_lineno NAME (aout, get_lineno)
458 #endif
459 #ifndef MY_set_arch_mach
460 #define MY_set_arch_mach NAME (aout, set_arch_mach)
461 #endif
462 #ifndef MY_find_nearest_line
463 #define MY_find_nearest_line NAME (aout, find_nearest_line)
464 #endif
465 #ifndef MY_find_inliner_info
466 #define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
467 #endif
468 #ifndef MY_sizeof_headers
469 #define MY_sizeof_headers NAME (aout, sizeof_headers)
470 #endif
471 #ifndef MY_bfd_get_relocated_section_contents
472 #define MY_bfd_get_relocated_section_contents \
473 bfd_generic_get_relocated_section_contents
474 #endif
475 #ifndef MY_bfd_relax_section
476 #define MY_bfd_relax_section bfd_generic_relax_section
477 #endif
478 #ifndef MY_bfd_gc_sections
479 #define MY_bfd_gc_sections bfd_generic_gc_sections
480 #endif
481 #ifndef MY_bfd_merge_sections
482 #define MY_bfd_merge_sections bfd_generic_merge_sections
483 #endif
484 #ifndef MY_bfd_is_group_section
485 #define MY_bfd_is_group_section bfd_generic_is_group_section
486 #endif
487 #ifndef MY_bfd_discard_group
488 #define MY_bfd_discard_group bfd_generic_discard_group
489 #endif
490 #ifndef MY_section_already_linked
491 #define MY_section_already_linked \
492 _bfd_generic_section_already_linked
493 #endif
494 #ifndef MY_bfd_reloc_type_lookup
495 #define MY_bfd_reloc_type_lookup NAME (aout, reloc_type_lookup)
496 #endif
497 #ifndef MY_bfd_make_debug_symbol
498 #define MY_bfd_make_debug_symbol 0
499 #endif
500 #ifndef MY_read_minisymbols
501 #define MY_read_minisymbols NAME (aout, read_minisymbols)
502 #endif
503 #ifndef MY_minisymbol_to_symbol
504 #define MY_minisymbol_to_symbol NAME (aout, minisymbol_to_symbol)
505 #endif
506 #ifndef MY_bfd_link_hash_table_create
507 #define MY_bfd_link_hash_table_create NAME (aout, link_hash_table_create)
508 #endif
509 #ifndef MY_bfd_link_hash_table_free
510 #define MY_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
511 #endif
512 #ifndef MY_bfd_link_add_symbols
513 #define MY_bfd_link_add_symbols NAME (aout, link_add_symbols)
514 #endif
515 #ifndef MY_bfd_link_just_syms
516 #define MY_bfd_link_just_syms _bfd_generic_link_just_syms
517 #endif
518 #ifndef MY_bfd_link_split_section
519 #define MY_bfd_link_split_section _bfd_generic_link_split_section
520 #endif
522 #ifndef MY_bfd_copy_private_bfd_data
523 #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data
524 #endif
526 #ifndef MY_bfd_merge_private_bfd_data
527 #define MY_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
528 #endif
530 #ifndef MY_bfd_copy_private_symbol_data
531 #define MY_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data
532 #endif
534 #ifndef MY_bfd_copy_private_header_data
535 #define MY_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data
536 #endif
538 #ifndef MY_bfd_print_private_bfd_data
539 #define MY_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
540 #endif
542 #ifndef MY_bfd_set_private_flags
543 #define MY_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
544 #endif
546 #ifndef MY_bfd_is_local_label_name
547 #define MY_bfd_is_local_label_name bfd_generic_is_local_label_name
548 #endif
550 #ifndef MY_bfd_is_target_special_symbol
551 #define MY_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
552 #endif
554 #ifndef MY_bfd_free_cached_info
555 #define MY_bfd_free_cached_info NAME (aout, bfd_free_cached_info)
556 #endif
558 #ifndef MY_close_and_cleanup
559 #define MY_close_and_cleanup MY_bfd_free_cached_info
560 #endif
562 #ifndef MY_get_dynamic_symtab_upper_bound
563 #define MY_get_dynamic_symtab_upper_bound \
564 _bfd_nodynamic_get_dynamic_symtab_upper_bound
565 #endif
566 #ifndef MY_canonicalize_dynamic_symtab
567 #define MY_canonicalize_dynamic_symtab \
568 _bfd_nodynamic_canonicalize_dynamic_symtab
569 #endif
570 #ifndef MY_get_synthetic_symtab
571 #define MY_get_synthetic_symtab \
572 _bfd_nodynamic_get_synthetic_symtab
573 #endif
574 #ifndef MY_get_dynamic_reloc_upper_bound
575 #define MY_get_dynamic_reloc_upper_bound \
576 _bfd_nodynamic_get_dynamic_reloc_upper_bound
577 #endif
578 #ifndef MY_canonicalize_dynamic_reloc
579 #define MY_canonicalize_dynamic_reloc \
580 _bfd_nodynamic_canonicalize_dynamic_reloc
581 #endif
583 /* Aout symbols normally have leading underscores. */
584 #ifndef MY_symbol_leading_char
585 #define MY_symbol_leading_char '_'
586 #endif
588 /* Aout archives normally use spaces for padding. */
589 #ifndef AR_PAD_CHAR
590 #define AR_PAD_CHAR ' '
591 #endif
593 #ifndef MY_BFD_TARGET
594 const bfd_target MY (vec) =
596 TARGETNAME, /* Name. */
597 bfd_target_aout_flavour,
598 #ifdef TARGET_IS_BIG_ENDIAN_P
599 BFD_ENDIAN_BIG, /* Target byte order (big). */
600 BFD_ENDIAN_BIG, /* Target headers byte order (big). */
601 #else
602 BFD_ENDIAN_LITTLE, /* Target byte order (little). */
603 BFD_ENDIAN_LITTLE, /* Target headers byte order (little). */
604 #endif
605 (HAS_RELOC | EXEC_P | /* Object flags. */
606 HAS_LINENO | HAS_DEBUG |
607 HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
608 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
609 MY_symbol_leading_char,
610 AR_PAD_CHAR, /* AR_pad_char. */
611 15, /* AR_max_namelen. */
612 #ifdef TARGET_IS_BIG_ENDIAN_P
613 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
614 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
615 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
616 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
617 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
618 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
619 #else
620 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
621 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
622 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
623 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
624 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
625 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
626 #endif
627 {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
628 bfd_generic_archive_p, MY_core_file_p},
629 {bfd_false, MY_mkobject, /* bfd_set_format. */
630 _bfd_generic_mkarchive, bfd_false},
631 {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
632 _bfd_write_archive_contents, bfd_false},
634 BFD_JUMP_TABLE_GENERIC (MY),
635 BFD_JUMP_TABLE_COPY (MY),
636 BFD_JUMP_TABLE_CORE (MY),
637 BFD_JUMP_TABLE_ARCHIVE (MY),
638 BFD_JUMP_TABLE_SYMBOLS (MY),
639 BFD_JUMP_TABLE_RELOCS (MY),
640 BFD_JUMP_TABLE_WRITE (MY),
641 BFD_JUMP_TABLE_LINK (MY),
642 BFD_JUMP_TABLE_DYNAMIC (MY),
644 /* Alternative_target. */
645 NULL,
647 MY_backend_data
649 #endif /* MY_BFD_TARGET */