1 /* BFD back-end for TMS320C54X coff binaries.
2 Copyright (C) 1999-2019 Free Software Foundation, Inc.
3 Contributed by Timothy Wall (twall@cygnus.com)
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 3 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., 51 Franklin Street - Fifth Floor, Boston, MA
26 #include "coff/tic54x.h"
27 #include "coff/internal.h"
31 #define F_LSYMS F_LSYMS_TICOFF
34 tic54x_reloc_processing (arelent
*, struct internal_reloc
*,
35 asymbol
**, bfd
*, asection
*);
38 The octet order is screwy. words are LSB first (LS octet, actually), but
39 longwords are MSW first. For example, 0x12345678 is encoded 0x5678 in the
40 first word and 0x1234 in the second. When looking at the data as stored in
41 the COFF file, you would see the octets ordered as 0x78, 0x56, 0x34, 0x12.
42 Don't bother with 64-bits, as there aren't any. */
45 tic54x_getl32 (const void *p
)
47 const bfd_byte
*addr
= p
;
50 v
= (unsigned long) addr
[2];
51 v
|= (unsigned long) addr
[3] << 8;
52 v
|= (unsigned long) addr
[0] << 16;
53 v
|= (unsigned long) addr
[1] << 24;
58 tic54x_putl32 (bfd_vma data
, void *p
)
61 addr
[2] = data
& 0xff;
62 addr
[3] = (data
>> 8) & 0xff;
63 addr
[0] = (data
>> 16) & 0xff;
64 addr
[1] = (data
>> 24) & 0xff;
68 tic54x_getl_signed_32 (const void *p
)
70 const bfd_byte
*addr
= p
;
73 v
= (unsigned long) addr
[2];
74 v
|= (unsigned long) addr
[3] << 8;
75 v
|= (unsigned long) addr
[0] << 16;
76 v
|= (unsigned long) addr
[1] << 24;
78 ((bfd_signed_vma) (long) (((unsigned long) (x) ^ 0x80000000) - 0x80000000))
82 #define coff_get_section_load_page bfd_ticoff_get_section_load_page
83 #define coff_set_section_load_page bfd_ticoff_set_section_load_page
86 bfd_ticoff_set_section_load_page (asection
*sect
,
89 sect
->lma
= (sect
->lma
& ADDR_MASK
) | PG_TO_FLAG(page
);
93 bfd_ticoff_get_section_load_page (asection
*sect
)
97 /* Provide meaningful defaults for predefined sections. */
98 if (sect
== bfd_com_section_ptr
)
101 else if (bfd_is_und_section (sect
)
102 || bfd_is_abs_section (sect
)
103 || bfd_is_ind_section (sect
))
107 page
= FLAG_TO_PG (sect
->lma
);
112 /* Set the architecture appropriately. Allow unkown architectures
116 tic54x_set_arch_mach (bfd
*abfd
,
117 enum bfd_architecture arch
,
118 unsigned long machine
)
120 if (arch
== bfd_arch_unknown
)
121 arch
= bfd_arch_tic54x
;
123 else if (arch
!= bfd_arch_tic54x
)
126 return bfd_default_set_arch_mach (abfd
, arch
, machine
);
129 static bfd_reloc_status_type
130 tic54x_relocation (bfd
*abfd ATTRIBUTE_UNUSED
,
131 arelent
*reloc_entry
,
132 asymbol
*symbol ATTRIBUTE_UNUSED
,
133 void * data ATTRIBUTE_UNUSED
,
134 asection
*input_section
,
136 char **error_message ATTRIBUTE_UNUSED
)
138 if (output_bfd
!= (bfd
*) NULL
)
140 /* This is a partial relocation, and we want to apply the
141 relocation to the reloc entry rather than the raw data.
142 Modify the reloc inplace to reflect what we now know. */
143 reloc_entry
->address
+= input_section
->output_offset
;
146 return bfd_reloc_continue
;
149 reloc_howto_type tic54x_howto_table
[] =
151 /* type,rightshift,size (0=byte, 1=short, 2=long),
152 bit size, pc_relative, bitpos, dont complain_on_overflow,
153 special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset. */
156 /* 16-bit direct reference to symbol's address. */
157 HOWTO (R_RELWORD
,0,1,16,FALSE
,0,complain_overflow_dont
,
158 tic54x_relocation
,"REL16",FALSE
,0xFFFF,0xFFFF,FALSE
),
160 /* 7 LSBs of an address */
161 HOWTO (R_PARTLS7
,0,1,7,FALSE
,0,complain_overflow_dont
,
162 tic54x_relocation
,"LS7",FALSE
,0x007F,0x007F,FALSE
),
164 /* 9 MSBs of an address */
165 /* TI assembler doesn't shift its encoding, and is thus incompatible */
166 HOWTO (R_PARTMS9
,7,1,9,FALSE
,0,complain_overflow_dont
,
167 tic54x_relocation
,"MS9",FALSE
,0x01FF,0x01FF,FALSE
),
169 /* 23-bit relocation */
170 HOWTO (R_EXTWORD
,0,2,23,FALSE
,0,complain_overflow_dont
,
171 tic54x_relocation
,"RELEXT",FALSE
,0x7FFFFF,0x7FFFFF,FALSE
),
173 /* 16 bits of 23-bit extended address */
174 HOWTO (R_EXTWORD16
,0,1,16,FALSE
,0,complain_overflow_dont
,
175 tic54x_relocation
,"RELEXT16",FALSE
,0x7FFFFF,0x7FFFFF,FALSE
),
177 /* upper 7 bits of 23-bit extended address */
178 HOWTO (R_EXTWORDMS7
,16,1,7,FALSE
,0,complain_overflow_dont
,
179 tic54x_relocation
,"RELEXTMS7",FALSE
,0x7F,0x7F,FALSE
),
182 /* 16-bit direct reference to symbol's address, absolute */
183 HOWTO (R_RELWORD
,0,1,16,FALSE
,0,complain_overflow_dont
,
184 tic54x_relocation
,"AREL16",FALSE
,0xFFFF,0xFFFF,FALSE
),
186 /* 7 LSBs of an address, absolute */
187 HOWTO (R_PARTLS7
,0,1,7,FALSE
,0,complain_overflow_dont
,
188 tic54x_relocation
,"ALS7",FALSE
,0x007F,0x007F,FALSE
),
190 /* 9 MSBs of an address, absolute */
191 /* TI assembler doesn't shift its encoding, and is thus incompatible */
192 HOWTO (R_PARTMS9
,7,1,9,FALSE
,0,complain_overflow_dont
,
193 tic54x_relocation
,"AMS9",FALSE
,0x01FF,0x01FF,FALSE
),
195 /* 23-bit direct reference, absolute */
196 HOWTO (R_EXTWORD
,0,2,23,FALSE
,0,complain_overflow_dont
,
197 tic54x_relocation
,"ARELEXT",FALSE
,0x7FFFFF,0x7FFFFF,FALSE
),
199 /* 16 bits of 23-bit extended address, absolute */
200 HOWTO (R_EXTWORD16
,0,1,16,FALSE
,0,complain_overflow_dont
,
201 tic54x_relocation
,"ARELEXT16",FALSE
,0x7FFFFF,0x7FFFFF,FALSE
),
203 /* upper 7 bits of 23-bit extended address, absolute */
204 HOWTO (R_EXTWORDMS7
,16,1,7,FALSE
,0,complain_overflow_dont
,
205 tic54x_relocation
,"ARELEXTMS7",FALSE
,0x7F,0x7F,FALSE
),
207 /* 32-bit relocation exclusively for stabs */
208 HOWTO (R_RELLONG
,0,2,32,FALSE
,0,complain_overflow_dont
,
209 tic54x_relocation
,"STAB",FALSE
,0xFFFFFFFF,0xFFFFFFFF,FALSE
),
212 #define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
213 #define coff_bfd_reloc_name_lookup tic54x_coff_reloc_name_lookup
215 /* For the case statement use the code values used tc_gen_reloc (defined in
216 bfd/reloc.c) to map to the howto table entries. */
218 static reloc_howto_type
*
219 tic54x_coff_reloc_type_lookup (bfd
*abfd ATTRIBUTE_UNUSED
,
220 bfd_reloc_code_real_type code
)
225 return &tic54x_howto_table
[0];
226 case BFD_RELOC_TIC54X_PARTLS7
:
227 return &tic54x_howto_table
[1];
228 case BFD_RELOC_TIC54X_PARTMS9
:
229 return &tic54x_howto_table
[2];
230 case BFD_RELOC_TIC54X_23
:
231 return &tic54x_howto_table
[3];
232 case BFD_RELOC_TIC54X_16_OF_23
:
233 return &tic54x_howto_table
[4];
234 case BFD_RELOC_TIC54X_MS7_OF_23
:
235 return &tic54x_howto_table
[5];
237 return &tic54x_howto_table
[12];
239 return (reloc_howto_type
*) NULL
;
243 static reloc_howto_type
*
244 tic54x_coff_reloc_name_lookup (bfd
*abfd ATTRIBUTE_UNUSED
,
250 i
< sizeof (tic54x_howto_table
) / sizeof (tic54x_howto_table
[0]);
252 if (tic54x_howto_table
[i
].name
!= NULL
253 && strcasecmp (tic54x_howto_table
[i
].name
, r_name
) == 0)
254 return &tic54x_howto_table
[i
];
259 /* Code to turn a r_type into a howto ptr, uses the above howto table.
260 Called after some initial checking by the tic54x_rtype_to_howto fn below. */
263 tic54x_lookup_howto (bfd
*abfd
,
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 (_("%pB: unsupported relocation type %#x"),
280 abfd
, (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
,
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 (abfd
, &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 /* Customize coffcode.h; the default coff_ functions are set up to use COFF2;
327 coff_bad_format_hook uses BADMAG, so set that for COFF2. The COFF1
328 and COFF0 vectors use custom _bad_format_hook procs instead of setting
330 #define BADMAG(x) COFF2_BADMAG(x)
332 #ifndef bfd_pe_print_pdata
333 #define bfd_pe_print_pdata NULL
336 #include "coffcode.h"
339 tic54x_set_section_contents (bfd
*abfd
,
341 const void * location
,
343 bfd_size_type bytes_to_do
)
345 return coff_set_section_contents (abfd
, section
, location
,
346 offset
, bytes_to_do
);
350 tic54x_reloc_processing (arelent
*relent
,
351 struct internal_reloc
*reloc
,
358 relent
->address
= reloc
->r_vaddr
;
360 if (reloc
->r_symndx
!= -1)
362 if (reloc
->r_symndx
< 0 || reloc
->r_symndx
>= obj_conv_table_size (abfd
))
365 /* xgettext: c-format */
366 (_("%pB: warning: illegal symbol index %ld in relocs"),
367 abfd
, reloc
->r_symndx
);
368 relent
->sym_ptr_ptr
= bfd_abs_section_ptr
->symbol_ptr_ptr
;
373 relent
->sym_ptr_ptr
= (symbols
374 + obj_convert (abfd
)[reloc
->r_symndx
]);
375 ptr
= *(relent
->sym_ptr_ptr
);
380 relent
->sym_ptr_ptr
= section
->symbol_ptr_ptr
;
381 ptr
= *(relent
->sym_ptr_ptr
);
384 /* The symbols definitions that we have read in have been
385 relocated as if their sections started at 0. But the offsets
386 refering to the symbols in the raw data have not been
387 modified, so we have to have a negative addend to compensate.
389 Note that symbols which used to be common must be left alone. */
391 /* Calculate any reloc addend by looking at the symbol. */
392 CALC_ADDEND (abfd
, ptr
, *reloc
, relent
);
394 relent
->address
-= section
->vma
;
395 /* !! relent->section = (asection *) NULL;*/
397 /* Fill in the relent->howto field from reloc->r_type. */
398 tic54x_lookup_howto (abfd
, relent
, reloc
);
401 /* TI COFF v0, DOS tools (little-endian headers). */
402 const bfd_target tic54x_coff0_vec
=
404 "coff0-c54x", /* name */
405 bfd_target_coff_flavour
,
406 BFD_ENDIAN_LITTLE
, /* data byte order is little */
407 BFD_ENDIAN_LITTLE
, /* header byte order is little (DOS tools) */
409 (HAS_RELOC
| EXEC_P
/* object flags */
410 | HAS_LINENO
| HAS_DEBUG
411 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
413 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
414 '_', /* leading symbol underscore */
415 '/', /* ar_pad_char */
416 15, /* ar_max_namelen */
417 0, /* match priority. */
418 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
419 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
420 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
421 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
422 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
423 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
425 { /* bfd_check_format */
428 bfd_generic_archive_p
,
431 { /* bfd_set_format */
432 _bfd_bool_bfd_false_error
,
434 _bfd_generic_mkarchive
,
435 _bfd_bool_bfd_false_error
437 { /* bfd_write_contents */
438 _bfd_bool_bfd_false_error
,
439 coff_write_object_contents
,
440 _bfd_write_archive_contents
,
441 _bfd_bool_bfd_false_error
444 BFD_JUMP_TABLE_GENERIC (coff
),
445 BFD_JUMP_TABLE_COPY (coff
),
446 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
447 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
448 BFD_JUMP_TABLE_SYMBOLS (coff
),
449 BFD_JUMP_TABLE_RELOCS (coff
),
450 BFD_JUMP_TABLE_WRITE (tic54x
),
451 BFD_JUMP_TABLE_LINK (coff
),
452 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
458 /* TI COFF v0, SPARC tools (big-endian headers). */
459 const bfd_target tic54x_coff0_beh_vec
=
461 "coff0-beh-c54x", /* name */
462 bfd_target_coff_flavour
,
463 BFD_ENDIAN_LITTLE
, /* data byte order is little */
464 BFD_ENDIAN_BIG
, /* header byte order is big */
466 (HAS_RELOC
| EXEC_P
/* object flags */
467 | HAS_LINENO
| HAS_DEBUG
468 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
470 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
471 '_', /* leading symbol underscore */
472 '/', /* ar_pad_char */
473 15, /* ar_max_namelen */
474 0, /* match priority. */
475 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
476 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
477 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
478 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
479 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
480 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* hdrs */
482 { /* bfd_check_format */
485 bfd_generic_archive_p
,
488 { /* bfd_set_format */
489 _bfd_bool_bfd_false_error
,
491 _bfd_generic_mkarchive
,
492 _bfd_bool_bfd_false_error
494 { /* bfd_write_contents */
495 _bfd_bool_bfd_false_error
,
496 coff_write_object_contents
,
497 _bfd_write_archive_contents
,
498 _bfd_bool_bfd_false_error
501 BFD_JUMP_TABLE_GENERIC (coff
),
502 BFD_JUMP_TABLE_COPY (coff
),
503 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
504 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
505 BFD_JUMP_TABLE_SYMBOLS (coff
),
506 BFD_JUMP_TABLE_RELOCS (coff
),
507 BFD_JUMP_TABLE_WRITE (tic54x
),
508 BFD_JUMP_TABLE_LINK (coff
),
509 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
516 /* TI COFF v1, DOS tools (little-endian headers). */
517 const bfd_target tic54x_coff1_vec
=
519 "coff1-c54x", /* name */
520 bfd_target_coff_flavour
,
521 BFD_ENDIAN_LITTLE
, /* data byte order is little */
522 BFD_ENDIAN_LITTLE
, /* header byte order is little (DOS tools) */
524 (HAS_RELOC
| EXEC_P
/* object flags */
525 | HAS_LINENO
| HAS_DEBUG
526 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
528 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
529 '_', /* leading symbol underscore */
530 '/', /* ar_pad_char */
531 15, /* ar_max_namelen */
532 0, /* match priority. */
533 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
534 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
535 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
536 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
537 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
538 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
540 { /* bfd_check_format */
543 bfd_generic_archive_p
,
546 { /* bfd_set_format */
547 _bfd_bool_bfd_false_error
,
549 _bfd_generic_mkarchive
,
550 _bfd_bool_bfd_false_error
552 { /* bfd_write_contents */
553 _bfd_bool_bfd_false_error
,
554 coff_write_object_contents
,
555 _bfd_write_archive_contents
,
556 _bfd_bool_bfd_false_error
559 BFD_JUMP_TABLE_GENERIC (coff
),
560 BFD_JUMP_TABLE_COPY (coff
),
561 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
562 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
563 BFD_JUMP_TABLE_SYMBOLS (coff
),
564 BFD_JUMP_TABLE_RELOCS (coff
),
565 BFD_JUMP_TABLE_WRITE (tic54x
),
566 BFD_JUMP_TABLE_LINK (coff
),
567 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
569 &tic54x_coff0_beh_vec
,
574 /* TI COFF v1, SPARC tools (big-endian headers). */
575 const bfd_target tic54x_coff1_beh_vec
=
577 "coff1-beh-c54x", /* name */
578 bfd_target_coff_flavour
,
579 BFD_ENDIAN_LITTLE
, /* data byte order is little */
580 BFD_ENDIAN_BIG
, /* header byte order is big */
582 (HAS_RELOC
| EXEC_P
/* object flags */
583 | HAS_LINENO
| HAS_DEBUG
584 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
586 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
587 '_', /* leading symbol underscore */
588 '/', /* ar_pad_char */
589 15, /* ar_max_namelen */
590 0, /* match priority. */
591 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
592 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
593 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
594 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
595 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
596 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* hdrs */
598 { /* bfd_check_format */
601 bfd_generic_archive_p
,
604 { /* bfd_set_format */
605 _bfd_bool_bfd_false_error
,
607 _bfd_generic_mkarchive
,
608 _bfd_bool_bfd_false_error
610 { /* bfd_write_contents */
611 _bfd_bool_bfd_false_error
,
612 coff_write_object_contents
,
613 _bfd_write_archive_contents
,
614 _bfd_bool_bfd_false_error
617 BFD_JUMP_TABLE_GENERIC (coff
),
618 BFD_JUMP_TABLE_COPY (coff
),
619 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
620 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
621 BFD_JUMP_TABLE_SYMBOLS (coff
),
622 BFD_JUMP_TABLE_RELOCS (coff
),
623 BFD_JUMP_TABLE_WRITE (tic54x
),
624 BFD_JUMP_TABLE_LINK (coff
),
625 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
632 /* TI COFF v2, TI DOS tools output (little-endian headers). */
633 const bfd_target tic54x_coff2_vec
=
635 "coff2-c54x", /* name */
636 bfd_target_coff_flavour
,
637 BFD_ENDIAN_LITTLE
, /* data byte order is little */
638 BFD_ENDIAN_LITTLE
, /* header byte order is little (DOS tools) */
640 (HAS_RELOC
| EXEC_P
/* object flags */
641 | HAS_LINENO
| HAS_DEBUG
642 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
644 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
645 '_', /* leading symbol underscore */
646 '/', /* ar_pad_char */
647 15, /* ar_max_namelen */
648 0, /* match priority. */
649 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
650 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
651 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
652 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
653 bfd_getl32
, bfd_getl_signed_32
, bfd_putl32
,
654 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* hdrs */
656 { /* bfd_check_format */
659 bfd_generic_archive_p
,
662 { /* bfd_set_format */
663 _bfd_bool_bfd_false_error
,
665 _bfd_generic_mkarchive
,
666 _bfd_bool_bfd_false_error
668 { /* bfd_write_contents */
669 _bfd_bool_bfd_false_error
,
670 coff_write_object_contents
,
671 _bfd_write_archive_contents
,
672 _bfd_bool_bfd_false_error
675 BFD_JUMP_TABLE_GENERIC (coff
),
676 BFD_JUMP_TABLE_COPY (coff
),
677 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
678 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
679 BFD_JUMP_TABLE_SYMBOLS (coff
),
680 BFD_JUMP_TABLE_RELOCS (coff
),
681 BFD_JUMP_TABLE_WRITE (tic54x
),
682 BFD_JUMP_TABLE_LINK (coff
),
683 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),
685 &tic54x_coff1_beh_vec
,
690 /* TI COFF v2, TI SPARC tools output (big-endian headers). */
691 const bfd_target tic54x_coff2_beh_vec
=
693 "coff2-beh-c54x", /* name */
694 bfd_target_coff_flavour
,
695 BFD_ENDIAN_LITTLE
, /* data byte order is little */
696 BFD_ENDIAN_BIG
, /* header byte order is big */
698 (HAS_RELOC
| EXEC_P
/* object flags */
699 | HAS_LINENO
| HAS_DEBUG
700 | HAS_SYMS
| HAS_LOCALS
| WP_TEXT
),
702 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* section flags */
703 '_', /* leading symbol underscore */
704 '/', /* ar_pad_char */
705 15, /* ar_max_namelen */
706 0, /* match priority. */
707 bfd_getl64
, bfd_getl_signed_64
, bfd_putl64
,
708 tic54x_getl32
, tic54x_getl_signed_32
, tic54x_putl32
,
709 bfd_getl16
, bfd_getl_signed_16
, bfd_putl16
, /* data */
710 bfd_getb64
, bfd_getb_signed_64
, bfd_putb64
,
711 bfd_getb32
, bfd_getb_signed_32
, bfd_putb32
,
712 bfd_getb16
, bfd_getb_signed_16
, bfd_putb16
, /* hdrs */
714 { /* bfd_check_format */
717 bfd_generic_archive_p
,
720 { /* bfd_set_format */
721 _bfd_bool_bfd_false_error
,
723 _bfd_generic_mkarchive
,
724 _bfd_bool_bfd_false_error
726 { /* bfd_write_contents */
727 _bfd_bool_bfd_false_error
,
728 coff_write_object_contents
,
729 _bfd_write_archive_contents
,
730 _bfd_bool_bfd_false_error
733 BFD_JUMP_TABLE_GENERIC (coff
),
734 BFD_JUMP_TABLE_COPY (coff
),
735 BFD_JUMP_TABLE_CORE (_bfd_nocore
),
736 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff
),
737 BFD_JUMP_TABLE_SYMBOLS (coff
),
738 BFD_JUMP_TABLE_RELOCS (coff
),
739 BFD_JUMP_TABLE_WRITE (tic54x
),
740 BFD_JUMP_TABLE_LINK (coff
),
741 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic
),