1 /* BFD back-end for TMS320C54X coff binaries.
2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2011, 2012
3 Free Software Foundation, Inc.
4 Contributed by Timothy Wall (twall@cygnus.com)
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 3 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
27 #include "coff/tic54x.h"
28 #include "coff/internal.h"
32 #define F_LSYMS F_LSYMS_TICOFF
35 tic54x_reloc_processing (arelent *, struct internal_reloc *,
36 asymbol **, bfd *, asection *);
39 The octet order is screwy. words are LSB first (LS octet, actually), but
40 longwords are MSW first. For example, 0x12345678 is encoded 0x5678 in the
41 first word and 0x1234 in the second. When looking at the data as stored in
42 the COFF file, you would see the octets ordered as 0x78, 0x56, 0x34, 0x12.
43 Don't bother with 64-bits, as there aren't any. */
46 tic54x_getl32 (const void *p)
48 const bfd_byte *addr = p;
51 v = (unsigned long) addr[2];
52 v |= (unsigned long) addr[3] << 8;
53 v |= (unsigned long) addr[0] << 16;
54 v |= (unsigned long) addr[1] << 24;
59 tic54x_putl32 (bfd_vma data, void *p)
62 addr[2] = data & 0xff;
63 addr[3] = (data >> 8) & 0xff;
64 addr[0] = (data >> 16) & 0xff;
65 addr[1] = (data >> 24) & 0xff;
69 tic54x_getl_signed_32 (const void *p)
71 const bfd_byte *addr = p;
74 v = (unsigned long) addr[2];
75 v |= (unsigned long) addr[3] << 8;
76 v |= (unsigned long) addr[0] << 16;
77 v |= (unsigned long) addr[1] << 24;
79 ((bfd_signed_vma) (long) (((unsigned long) (x) ^ 0x80000000) - 0x80000000))
83 #define coff_get_section_load_page bfd_ticoff_get_section_load_page
84 #define coff_set_section_load_page bfd_ticoff_set_section_load_page
87 bfd_ticoff_set_section_load_page (asection *sect,
90 sect->lma = (sect->lma & ADDR_MASK) | PG_TO_FLAG(page);
94 bfd_ticoff_get_section_load_page (asection *sect)
98 /* Provide meaningful defaults for predefined sections. */
99 if (sect == bfd_com_section_ptr)
102 else if (bfd_is_und_section (sect)
103 || bfd_is_abs_section (sect)
104 || bfd_is_ind_section (sect))
108 page = FLAG_TO_PG (sect->lma);
113 /* Set the architecture appropriately. Allow unkown architectures
117 tic54x_set_arch_mach (bfd *abfd,
118 enum bfd_architecture arch,
119 unsigned long machine)
121 if (arch == bfd_arch_unknown)
122 arch = bfd_arch_tic54x;
124 else if (arch != bfd_arch_tic54x)
127 return bfd_default_set_arch_mach (abfd, arch, machine);
130 static bfd_reloc_status_type
131 tic54x_relocation (bfd *abfd ATTRIBUTE_UNUSED,
132 arelent *reloc_entry,
133 asymbol *symbol ATTRIBUTE_UNUSED,
134 void * data ATTRIBUTE_UNUSED,
135 asection *input_section,
137 char **error_message ATTRIBUTE_UNUSED)
139 if (output_bfd != (bfd *) NULL)
141 /* This is a partial relocation, and we want to apply the
142 relocation to the reloc entry rather than the raw data.
143 Modify the reloc inplace to reflect what we now know. */
144 reloc_entry->address += input_section->output_offset;
147 return bfd_reloc_continue;
150 reloc_howto_type tic54x_howto_table[] =
152 /* type,rightshift,size (0=byte, 1=short, 2=long),
153 bit size, pc_relative, bitpos, dont complain_on_overflow,
154 special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset. */
157 /* 16-bit direct reference to symbol's address. */
158 HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
159 tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE),
161 /* 7 LSBs of an address */
162 HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
163 tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE),
165 /* 9 MSBs of an address */
166 /* TI assembler doesn't shift its encoding, and is thus incompatible */
167 HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
168 tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE),
170 /* 23-bit relocation */
171 HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
172 tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
174 /* 16 bits of 23-bit extended address */
175 HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
176 tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
178 /* upper 7 bits of 23-bit extended address */
179 HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
180 tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE),
183 /* 16-bit direct reference to symbol's address, absolute */
184 HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
185 tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE),
187 /* 7 LSBs of an address, absolute */
188 HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
189 tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE),
191 /* 9 MSBs of an address, absolute */
192 /* TI assembler doesn't shift its encoding, and is thus incompatible */
193 HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
194 tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE),
196 /* 23-bit direct reference, absolute */
197 HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
198 tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
200 /* 16 bits of 23-bit extended address, absolute */
201 HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
202 tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
204 /* upper 7 bits of 23-bit extended address, absolute */
205 HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
206 tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE),
208 /* 32-bit relocation exclusively for stabs */
209 HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont,
210 tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE),
213 #define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
214 #define coff_bfd_reloc_name_lookup tic54x_coff_reloc_name_lookup
216 /* For the case statement use the code values used tc_gen_reloc (defined in
217 bfd/reloc.c) to map to the howto table entries. */
219 static reloc_howto_type *
220 tic54x_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
221 bfd_reloc_code_real_type code)
226 return &tic54x_howto_table[0];
227 case BFD_RELOC_TIC54X_PARTLS7:
228 return &tic54x_howto_table[1];
229 case BFD_RELOC_TIC54X_PARTMS9:
230 return &tic54x_howto_table[2];
231 case BFD_RELOC_TIC54X_23:
232 return &tic54x_howto_table[3];
233 case BFD_RELOC_TIC54X_16_OF_23:
234 return &tic54x_howto_table[4];
235 case BFD_RELOC_TIC54X_MS7_OF_23:
236 return &tic54x_howto_table[5];
238 return &tic54x_howto_table[12];
240 return (reloc_howto_type *) NULL;
244 static reloc_howto_type *
245 tic54x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
251 i < sizeof (tic54x_howto_table) / sizeof (tic54x_howto_table[0]);
253 if (tic54x_howto_table[i].name != NULL
254 && strcasecmp (tic54x_howto_table[i].name, r_name) == 0)
255 return &tic54x_howto_table[i];
260 /* Code to turn a r_type into a howto ptr, uses the above howto table.
261 Called after some initial checking by the tic54x_rtype_to_howto fn below. */
264 tic54x_lookup_howto (arelent *internal,
265 struct internal_reloc *dst)
268 int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
270 for (i = 0; i < sizeof tic54x_howto_table/sizeof tic54x_howto_table[0]; i++)
272 if (tic54x_howto_table[i].type == dst->r_type)
274 internal->howto = tic54x_howto_table + i + bank;
279 (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
280 (unsigned int) dst->r_type);
284 #define RELOC_PROCESSING(RELENT,RELOC,SYMS,ABFD,SECT)\
285 tic54x_reloc_processing(RELENT,RELOC,SYMS,ABFD,SECT)
287 #define coff_rtype_to_howto coff_tic54x_rtype_to_howto
289 static reloc_howto_type *
290 coff_tic54x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
292 struct internal_reloc *rel,
293 struct coff_link_hash_entry *h ATTRIBUTE_UNUSED,
294 struct internal_syment *sym ATTRIBUTE_UNUSED,
299 if (rel->r_symndx == -1 && addendp != NULL)
301 /* This is a TI "internal relocation", which means that the relocation
302 amount is the amount by which the current section is being relocated
303 in the output section. */
304 *addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
307 tic54x_lookup_howto (&genrel, rel);
312 /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
316 ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
319 if (TICOFF_LOCAL_LABEL_P(name))
324 #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
326 /* Clear the r_reserved field in relocs. */
327 #define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
330 dst->r_reserved[0] = 0; \
331 dst->r_reserved[1] = 0; \
335 /* Customize coffcode.h; the default coff_ functions are set up to use COFF2;
336 coff_bad_format_hook uses BADMAG, so set that for COFF2. The COFF1
337 and COFF0 vectors use custom _bad_format_hook procs instead of setting
339 #define BADMAG(x) COFF2_BADMAG(x)
341 #ifndef bfd_pe_print_pdata
342 #define bfd_pe_print_pdata NULL
345 #include "coffcode.h"
348 tic54x_set_section_contents (bfd *abfd,
350 const void * location,
352 bfd_size_type bytes_to_do)
354 return coff_set_section_contents (abfd, section, location,
355 offset, bytes_to_do);
359 tic54x_reloc_processing (arelent *relent,
360 struct internal_reloc *reloc,
367 relent->address = reloc->r_vaddr;
369 if (reloc->r_symndx != -1)
371 if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
373 (*_bfd_error_handler)
374 (_("%B: warning: illegal symbol index %ld in relocs"),
375 abfd, reloc->r_symndx);
376 relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
381 relent->sym_ptr_ptr = (symbols
382 + obj_convert (abfd)[reloc->r_symndx]);
383 ptr = *(relent->sym_ptr_ptr);
388 relent->sym_ptr_ptr = section->symbol_ptr_ptr;
389 ptr = *(relent->sym_ptr_ptr);
392 /* The symbols definitions that we have read in have been
393 relocated as if their sections started at 0. But the offsets
394 refering to the symbols in the raw data have not been
395 modified, so we have to have a negative addend to compensate.
397 Note that symbols which used to be common must be left alone. */
399 /* Calculate any reloc addend by looking at the symbol. */
400 CALC_ADDEND (abfd, ptr, *reloc, relent);
402 relent->address -= section->vma;
403 /* !! relent->section = (asection *) NULL;*/
405 /* Fill in the relent->howto field from reloc->r_type. */
406 tic54x_lookup_howto (relent, reloc);
409 /* TI COFF v0, DOS tools (little-endian headers). */
410 const bfd_target tic54x_coff0_vec =
412 "coff0-c54x", /* name */
413 bfd_target_coff_flavour,
414 BFD_ENDIAN_LITTLE, /* data byte order is little */
415 BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
417 (HAS_RELOC | EXEC_P | /* object flags */
418 HAS_LINENO | HAS_DEBUG |
419 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
421 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
422 '_', /* leading symbol underscore */
423 '/', /* ar_pad_char */
424 15, /* ar_max_namelen */
425 0, /* match priority. */
426 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
427 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
428 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
429 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
430 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
431 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
433 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
434 bfd_generic_archive_p, _bfd_dummy_target},
435 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
437 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
438 _bfd_write_archive_contents, bfd_false},
440 BFD_JUMP_TABLE_GENERIC (coff),
441 BFD_JUMP_TABLE_COPY (coff),
442 BFD_JUMP_TABLE_CORE (_bfd_nocore),
443 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
444 BFD_JUMP_TABLE_SYMBOLS (coff),
445 BFD_JUMP_TABLE_RELOCS (coff),
446 BFD_JUMP_TABLE_WRITE (tic54x),
447 BFD_JUMP_TABLE_LINK (coff),
448 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
454 /* TI COFF v0, SPARC tools (big-endian headers). */
455 const bfd_target tic54x_coff0_beh_vec =
457 "coff0-beh-c54x", /* name */
458 bfd_target_coff_flavour,
459 BFD_ENDIAN_LITTLE, /* data byte order is little */
460 BFD_ENDIAN_BIG, /* header byte order is big */
462 (HAS_RELOC | EXEC_P | /* object flags */
463 HAS_LINENO | HAS_DEBUG |
464 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
466 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
467 '_', /* leading symbol underscore */
468 '/', /* ar_pad_char */
469 15, /* ar_max_namelen */
470 0, /* match priority. */
471 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
472 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
473 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
474 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
475 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
476 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
478 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
479 bfd_generic_archive_p, _bfd_dummy_target},
480 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
482 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
483 _bfd_write_archive_contents, bfd_false},
485 BFD_JUMP_TABLE_GENERIC (coff),
486 BFD_JUMP_TABLE_COPY (coff),
487 BFD_JUMP_TABLE_CORE (_bfd_nocore),
488 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
489 BFD_JUMP_TABLE_SYMBOLS (coff),
490 BFD_JUMP_TABLE_RELOCS (coff),
491 BFD_JUMP_TABLE_WRITE (tic54x),
492 BFD_JUMP_TABLE_LINK (coff),
493 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
500 /* TI COFF v1, DOS tools (little-endian headers). */
501 const bfd_target tic54x_coff1_vec =
503 "coff1-c54x", /* name */
504 bfd_target_coff_flavour,
505 BFD_ENDIAN_LITTLE, /* data byte order is little */
506 BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
508 (HAS_RELOC | EXEC_P | /* object flags */
509 HAS_LINENO | HAS_DEBUG |
510 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
512 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
513 '_', /* leading symbol underscore */
514 '/', /* ar_pad_char */
515 15, /* ar_max_namelen */
516 0, /* match priority. */
517 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
518 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
519 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
520 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
521 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
522 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
524 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
525 bfd_generic_archive_p, _bfd_dummy_target},
526 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
528 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
529 _bfd_write_archive_contents, bfd_false},
531 BFD_JUMP_TABLE_GENERIC (coff),
532 BFD_JUMP_TABLE_COPY (coff),
533 BFD_JUMP_TABLE_CORE (_bfd_nocore),
534 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
535 BFD_JUMP_TABLE_SYMBOLS (coff),
536 BFD_JUMP_TABLE_RELOCS (coff),
537 BFD_JUMP_TABLE_WRITE (tic54x),
538 BFD_JUMP_TABLE_LINK (coff),
539 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
541 & tic54x_coff0_beh_vec,
546 /* TI COFF v1, SPARC tools (big-endian headers). */
547 const bfd_target tic54x_coff1_beh_vec =
549 "coff1-beh-c54x", /* name */
550 bfd_target_coff_flavour,
551 BFD_ENDIAN_LITTLE, /* data byte order is little */
552 BFD_ENDIAN_BIG, /* header byte order is big */
554 (HAS_RELOC | EXEC_P | /* object flags */
555 HAS_LINENO | HAS_DEBUG |
556 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
558 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
559 '_', /* leading symbol underscore */
560 '/', /* ar_pad_char */
561 15, /* ar_max_namelen */
562 0, /* match priority. */
563 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
564 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
565 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
566 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
567 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
568 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
570 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
571 bfd_generic_archive_p, _bfd_dummy_target},
572 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
574 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
575 _bfd_write_archive_contents, bfd_false},
577 BFD_JUMP_TABLE_GENERIC (coff),
578 BFD_JUMP_TABLE_COPY (coff),
579 BFD_JUMP_TABLE_CORE (_bfd_nocore),
580 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
581 BFD_JUMP_TABLE_SYMBOLS (coff),
582 BFD_JUMP_TABLE_RELOCS (coff),
583 BFD_JUMP_TABLE_WRITE (tic54x),
584 BFD_JUMP_TABLE_LINK (coff),
585 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
592 /* TI COFF v2, TI DOS tools output (little-endian headers). */
593 const bfd_target tic54x_coff2_vec =
595 "coff2-c54x", /* name */
596 bfd_target_coff_flavour,
597 BFD_ENDIAN_LITTLE, /* data byte order is little */
598 BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
600 (HAS_RELOC | EXEC_P | /* object flags */
601 HAS_LINENO | HAS_DEBUG |
602 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
604 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
605 '_', /* leading symbol underscore */
606 '/', /* ar_pad_char */
607 15, /* ar_max_namelen */
608 0, /* match priority. */
609 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
610 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
611 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
612 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
613 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
614 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
616 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
617 bfd_generic_archive_p, _bfd_dummy_target},
618 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
620 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
621 _bfd_write_archive_contents, bfd_false},
623 BFD_JUMP_TABLE_GENERIC (coff),
624 BFD_JUMP_TABLE_COPY (coff),
625 BFD_JUMP_TABLE_CORE (_bfd_nocore),
626 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
627 BFD_JUMP_TABLE_SYMBOLS (coff),
628 BFD_JUMP_TABLE_RELOCS (coff),
629 BFD_JUMP_TABLE_WRITE (tic54x),
630 BFD_JUMP_TABLE_LINK (coff),
631 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
633 & tic54x_coff1_beh_vec,
638 /* TI COFF v2, TI SPARC tools output (big-endian headers). */
639 const bfd_target tic54x_coff2_beh_vec =
641 "coff2-beh-c54x", /* name */
642 bfd_target_coff_flavour,
643 BFD_ENDIAN_LITTLE, /* data byte order is little */
644 BFD_ENDIAN_BIG, /* header byte order is big */
646 (HAS_RELOC | EXEC_P | /* object flags */
647 HAS_LINENO | HAS_DEBUG |
648 HAS_SYMS | HAS_LOCALS | WP_TEXT ),
650 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
651 '_', /* leading symbol underscore */
652 '/', /* ar_pad_char */
653 15, /* ar_max_namelen */
654 0, /* match priority. */
655 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
656 tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
657 bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
658 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
659 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
660 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
662 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
663 bfd_generic_archive_p, _bfd_dummy_target},
664 {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
666 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
667 _bfd_write_archive_contents, bfd_false},
669 BFD_JUMP_TABLE_GENERIC (coff),
670 BFD_JUMP_TABLE_COPY (coff),
671 BFD_JUMP_TABLE_CORE (_bfd_nocore),
672 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
673 BFD_JUMP_TABLE_SYMBOLS (coff),
674 BFD_JUMP_TABLE_RELOCS (coff),
675 BFD_JUMP_TABLE_WRITE (tic54x),
676 BFD_JUMP_TABLE_LINK (coff),
677 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),