1 /* BFD back-end for TMS320C4X coff binaries.
2 Copyright (C) 1996-99, 2000, 2002 Free Software Foundation, Inc.
3 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 #include "coff/tic4x.h"
27 #include "coff/internal.h"
31 #define F_LSYMS F_LSYMS_TICOFF
34 ticoff0_bad_format_hook (abfd, filehdr)
38 struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
40 if (COFF0_BADMAG (*internal_f))
47 ticoff1_bad_format_hook (abfd, filehdr)
48 bfd *abfd ATTRIBUTE_UNUSED;
51 struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
53 if (COFF1_BADMAG (*internal_f))
59 /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
62 ticoff_bfd_is_local_label_name (abfd, name)
63 bfd *abfd ATTRIBUTE_UNUSED;
66 if (TICOFF_LOCAL_LABEL_P(name))
71 #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
73 static void tic4x_reloc_processing
74 PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
76 #define RELOC_PROCESSING(RELENT,RELOC,SYMS,ABFD,SECT)\
77 tic4x_reloc_processing (RELENT,RELOC,SYMS,ABFD,SECT)
79 /* Customize coffcode.h; the default coff_ functions are set up to use
80 COFF2; coff_bad_format_hook uses BADMAG, so set that for COFF2.
81 The COFF1 and COFF0 vectors use custom _bad_format_hook procs
82 instead of setting BADMAG. */
83 #define BADMAG(x) COFF2_BADMAG(x)
86 static bfd_reloc_status_type
87 tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
88 output_bfd, error_message)
89 bfd *abfd ATTRIBUTE_UNUSED;
91 asymbol *symbol ATTRIBUTE_UNUSED;
92 PTR data ATTRIBUTE_UNUSED;
93 asection *input_section;
95 char **error_message ATTRIBUTE_UNUSED;
97 if (output_bfd != (bfd *) NULL)
99 /* This is a partial relocation, and we want to apply the
100 relocation to the reloc entry rather than the raw data.
101 Modify the reloc inplace to reflect what we now know. */
102 reloc_entry->address += input_section->output_offset;
105 return bfd_reloc_continue;
108 reloc_howto_type tic4x_howto_table[] =
110 HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
111 HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false),
112 HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
113 HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
114 HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
115 HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
116 HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
117 HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
118 HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
119 HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
120 HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
121 HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
122 HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
123 HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
125 #define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))
127 #undef coff_bfd_reloc_type_lookup
128 #define coff_bfd_reloc_type_lookup tic4x_coff_reloc_type_lookup
130 /* For the case statement use the code values used tc_gen_reloc (defined in
131 bfd/reloc.c) to map to the howto table entries. */
133 static reloc_howto_type *
134 tic4x_coff_reloc_type_lookup (abfd, code)
135 bfd *abfd ATTRIBUTE_UNUSED;
136 bfd_reloc_code_real_type code;
143 case BFD_RELOC_32: type = R_RELLONG; break;
144 case BFD_RELOC_24: type = R_REL24; break;
145 case BFD_RELOC_16: type = R_RELWORD; break;
146 case BFD_RELOC_24_PCREL: type = R_PCR24; break;
147 case BFD_RELOC_16_PCREL: type = R_PCRWORD; break;
148 case BFD_RELOC_HI16: type = R_PARTMS8; break;
149 case BFD_RELOC_LO16: type = R_PARTLS16; break;
154 for (i = 0; i < HOWTO_SIZE; i++)
156 if (tic4x_howto_table[i].type == type)
157 return tic4x_howto_table + i;
163 /* Code to turn a r_type into a howto ptr, uses the above howto table.
164 Called after some initial checking by the tic4x_rtype_to_howto fn
167 tic4x_lookup_howto (internal, dst)
169 struct internal_reloc *dst;
172 int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
174 for (i = 0; i < HOWTO_SIZE; i++)
176 if (tic4x_howto_table[i].type == dst->r_type)
178 internal->howto = tic4x_howto_table + i + bank;
183 (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
184 (unsigned int) dst->r_type);
188 #undef coff_rtype_to_howto
189 #define coff_rtype_to_howto coff_tic4x_rtype_to_howto
191 static reloc_howto_type *
192 coff_tic4x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
193 bfd *abfd ATTRIBUTE_UNUSED;
195 struct internal_reloc *rel;
196 struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
197 struct internal_syment *sym ATTRIBUTE_UNUSED;
202 if (rel->r_symndx == -1 && addendp != NULL)
203 /* This is a TI "internal relocation", which means that the relocation
204 amount is the amount by which the current section is being relocated
205 in the output section. */
206 *addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
208 tic4x_lookup_howto (&genrel, rel);
215 tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
217 struct internal_reloc *reloc;
224 relent->address = reloc->r_vaddr;
226 if (reloc->r_symndx != -1)
228 if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
230 (*_bfd_error_handler)
231 (_("%s: warning: illegal symbol index %ld in relocs"),
232 bfd_get_filename (abfd), reloc->r_symndx);
233 relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
238 relent->sym_ptr_ptr = (symbols
239 + obj_convert (abfd)[reloc->r_symndx]);
240 ptr = *(relent->sym_ptr_ptr);
245 relent->sym_ptr_ptr = section->symbol_ptr_ptr;
246 ptr = *(relent->sym_ptr_ptr);
249 /* The symbols definitions that we have read in have been relocated
250 as if their sections started at 0. But the offsets refering to
251 the symbols in the raw data have not been modified, so we have to
252 have a negative addend to compensate.
254 Note that symbols which used to be common must be left alone. */
256 /* Calculate any reloc addend by looking at the symbol. */
257 CALC_ADDEND (abfd, ptr, *reloc, relent);
259 relent->address -= section->vma;
260 /* !! relent->section = (asection *) NULL; */
262 /* Fill in the relent->howto field from reloc->r_type. */
263 tic4x_lookup_howto (relent, reloc);
267 static const bfd_coff_backend_data ticoff0_swap_table =
269 coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
270 coff_SWAP_aux_out, coff_SWAP_sym_out,
271 coff_SWAP_lineno_out, coff_SWAP_reloc_out,
272 coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
273 coff_SWAP_scnhdr_out,
274 FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
275 #ifdef COFF_LONG_FILENAMES
280 #ifdef COFF_LONG_SECTION_NAMES
285 #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
290 #ifdef COFF_DEBUG_STRING_WIDE_PREFIX
295 COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
296 coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
297 coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
298 coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
299 coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
300 coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
301 coff_classify_symbol, coff_compute_section_file_positions,
302 coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
303 coff_adjust_symndx, coff_link_add_one_symbol,
304 coff_link_output_has_begun, coff_final_link_postscript
307 /* COFF1 differs in section header size. */
308 static const bfd_coff_backend_data ticoff1_swap_table =
310 coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
311 coff_SWAP_aux_out, coff_SWAP_sym_out,
312 coff_SWAP_lineno_out, coff_SWAP_reloc_out,
313 coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
314 coff_SWAP_scnhdr_out,
315 FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
316 #ifdef COFF_LONG_FILENAMES
321 #ifdef COFF_LONG_SECTION_NAMES
326 #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
331 #ifdef COFF_DEBUG_STRING_WIDE_PREFIX
336 COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
337 coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
338 coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
339 coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
340 coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
341 coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
342 coff_classify_symbol, coff_compute_section_file_positions,
343 coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
344 coff_adjust_symndx, coff_link_add_one_symbol,
345 coff_link_output_has_begun, coff_final_link_postscript
349 /* TI COFF v0, DOS tools (little-endian headers). */
350 const bfd_target tic4x_coff0_vec =
352 "coff0-c4x", /* Name. */
353 bfd_target_coff_flavour,
354 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
355 BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
357 (HAS_RELOC | EXEC_P | /* Object flags. */
358 HAS_LINENO | HAS_DEBUG |
359 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
361 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
362 '_', /* Leading symbol underscore. */
363 '/', /* ar_pad_char. */
364 15, /* ar_max_namelen. */
365 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
366 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
367 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
368 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
369 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
370 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
372 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
373 bfd_generic_archive_p, _bfd_dummy_target},
374 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
376 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
377 _bfd_write_archive_contents, bfd_false},
379 BFD_JUMP_TABLE_GENERIC (coff),
380 BFD_JUMP_TABLE_COPY (coff),
381 BFD_JUMP_TABLE_CORE (_bfd_nocore),
382 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
383 BFD_JUMP_TABLE_SYMBOLS (coff),
384 BFD_JUMP_TABLE_RELOCS (coff),
385 BFD_JUMP_TABLE_WRITE (coff),
386 BFD_JUMP_TABLE_LINK (coff),
387 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
390 (PTR)&ticoff0_swap_table
393 /* TI COFF v0, SPARC tools (big-endian headers). */
394 const bfd_target tic4x_coff0_beh_vec =
396 "coff0-beh-c4x", /* Name. */
397 bfd_target_coff_flavour,
398 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
399 BFD_ENDIAN_BIG, /* Header byte order is big. */
401 (HAS_RELOC | EXEC_P | /* Object flags. */
402 HAS_LINENO | HAS_DEBUG |
403 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
405 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
406 '_', /* Leading symbol underscore. */
407 '/', /* ar_pad_char */
408 15, /* ar_max_namelen */
409 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
410 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
411 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
412 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
413 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
414 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
416 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
417 bfd_generic_archive_p, _bfd_dummy_target},
418 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
420 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
421 _bfd_write_archive_contents, bfd_false},
423 BFD_JUMP_TABLE_GENERIC (coff),
424 BFD_JUMP_TABLE_COPY (coff),
425 BFD_JUMP_TABLE_CORE (_bfd_nocore),
426 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
427 BFD_JUMP_TABLE_SYMBOLS (coff),
428 BFD_JUMP_TABLE_RELOCS (coff),
429 BFD_JUMP_TABLE_WRITE (coff),
430 BFD_JUMP_TABLE_LINK (coff),
431 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
435 (PTR)&ticoff0_swap_table
438 /* TI COFF v1, DOS tools (little-endian headers). */
439 const bfd_target tic4x_coff1_vec =
441 "coff1-c4x", /* Name. */
442 bfd_target_coff_flavour,
443 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
444 BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
446 (HAS_RELOC | EXEC_P | /* Object flags. */
447 HAS_LINENO | HAS_DEBUG |
448 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
450 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
451 '_', /* Leading symbol underscore. */
452 '/', /* ar_pad_char */
453 15, /* ar_max_namelen */
454 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
455 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
456 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
457 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
458 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
459 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
461 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
462 bfd_generic_archive_p, _bfd_dummy_target},
463 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
465 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
466 _bfd_write_archive_contents, bfd_false},
468 BFD_JUMP_TABLE_GENERIC (coff),
469 BFD_JUMP_TABLE_COPY (coff),
470 BFD_JUMP_TABLE_CORE (_bfd_nocore),
471 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
472 BFD_JUMP_TABLE_SYMBOLS (coff),
473 BFD_JUMP_TABLE_RELOCS (coff),
474 BFD_JUMP_TABLE_WRITE (coff),
475 BFD_JUMP_TABLE_LINK (coff),
476 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
478 &tic4x_coff0_beh_vec,
480 (PTR)&ticoff1_swap_table
483 /* TI COFF v1, SPARC tools (big-endian headers). */
484 const bfd_target tic4x_coff1_beh_vec =
486 "coff1-beh-c4x", /* Name. */
487 bfd_target_coff_flavour,
488 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
489 BFD_ENDIAN_BIG, /* Header byte order is big. */
491 (HAS_RELOC | EXEC_P | /* Object flags. */
492 HAS_LINENO | HAS_DEBUG |
493 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
495 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
496 '_', /* Leading symbol underscore. */
497 '/', /* ar_pad_char */
498 15, /* ar_max_namelen */
499 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
500 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
501 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
502 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
503 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
504 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
506 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
507 bfd_generic_archive_p, _bfd_dummy_target},
508 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
510 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
511 _bfd_write_archive_contents, bfd_false},
513 BFD_JUMP_TABLE_GENERIC (coff),
514 BFD_JUMP_TABLE_COPY (coff),
515 BFD_JUMP_TABLE_CORE (_bfd_nocore),
516 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
517 BFD_JUMP_TABLE_SYMBOLS (coff),
518 BFD_JUMP_TABLE_RELOCS (coff),
519 BFD_JUMP_TABLE_WRITE (coff),
520 BFD_JUMP_TABLE_LINK (coff),
521 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
525 (PTR)&ticoff1_swap_table
528 /* TI COFF v2, TI DOS tools output (little-endian headers). */
529 const bfd_target tic4x_coff2_vec =
531 "coff2-c4x", /* Name. */
532 bfd_target_coff_flavour,
533 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
534 BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
536 (HAS_RELOC | EXEC_P | /* Object flags. */
537 HAS_LINENO | HAS_DEBUG |
538 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
540 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
541 '_', /* Leading symbol underscore. */
542 '/', /* ar_pad_char */
543 15, /* ar_max_namelen */
544 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
545 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
546 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
547 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
548 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
549 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
551 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
552 bfd_generic_archive_p, _bfd_dummy_target},
553 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
555 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
556 _bfd_write_archive_contents, bfd_false},
558 BFD_JUMP_TABLE_GENERIC (coff),
559 BFD_JUMP_TABLE_COPY (coff),
560 BFD_JUMP_TABLE_CORE (_bfd_nocore),
561 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
562 BFD_JUMP_TABLE_SYMBOLS (coff),
563 BFD_JUMP_TABLE_RELOCS (coff),
564 BFD_JUMP_TABLE_WRITE (coff),
565 BFD_JUMP_TABLE_LINK (coff),
566 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
568 &tic4x_coff1_beh_vec,
573 /* TI COFF v2, TI SPARC tools output (big-endian headers). */
574 const bfd_target tic4x_coff2_beh_vec =
576 "coff2-beh-c4x", /* Name. */
577 bfd_target_coff_flavour,
578 BFD_ENDIAN_LITTLE, /* Data byte order is little. */
579 BFD_ENDIAN_BIG, /* Header byte order is big. */
581 (HAS_RELOC | EXEC_P | /* Object flags. */
582 HAS_LINENO | HAS_DEBUG |
583 HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
585 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
586 '_', /* Leading symbol underscore. */
587 '/', /* ar_pad_char */
588 15, /* ar_max_namelen */
589 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
590 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
591 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
592 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
593 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
594 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
596 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
597 bfd_generic_archive_p, _bfd_dummy_target},
598 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
600 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
601 _bfd_write_archive_contents, bfd_false},
603 BFD_JUMP_TABLE_GENERIC (coff),
604 BFD_JUMP_TABLE_COPY (coff),
605 BFD_JUMP_TABLE_CORE (_bfd_nocore),
606 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
607 BFD_JUMP_TABLE_SYMBOLS (coff),
608 BFD_JUMP_TABLE_RELOCS (coff),
609 BFD_JUMP_TABLE_WRITE (coff),
610 BFD_JUMP_TABLE_LINK (coff),
611 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),