Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/coff-tic54x.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* BFD back-end for TMS320C54X coff binaries.
    2    Copyright 1999, 2000 Free Software Foundation, Inc.
     2   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    33   Contributed by Timothy Wall (twall@cygnus.com)
    44
     
    2828#include "libcoff.h"
    2929
    30 #undef F_LSYMS
     30#undef  F_LSYMS
    3131#define F_LSYMS         F_LSYMS_TICOFF
    3232
    33 /*
    34   32-bit operations
    35   The octet order is screwy.  words are LSB first (LS octet, actually), but
    36   longwords are MSW first.  For example, 0x12345678 is encoded 0x5678 in the
    37   first word and 0x1234 in the second.  When looking at the data as stored in
    38   the COFF file, you would see the octets ordered as 0x78, 0x56, 0x34, 0x12.
    39   Don't bother with 64-bits, as there aren't any.
    40  */
     33static void tic54x_reloc_processing
     34  PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
     35static bfd_reloc_status_type tic54x_relocation
     36  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
     37static bfd_boolean tic54x_set_section_contents
     38  PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
     39static reloc_howto_type *coff_tic54x_rtype_to_howto
     40  PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
     41static bfd_vma tic54x_getl32
     42  PARAMS ((const bfd_byte *));
     43static void tic54x_putl32
     44  PARAMS ((bfd_vma, bfd_byte *));
     45static bfd_signed_vma tic54x_getl_signed_32
     46  PARAMS ((const bfd_byte *));
     47static bfd_boolean tic54x_set_arch_mach
     48  PARAMS ((bfd *, enum bfd_architecture, unsigned long));
     49static reloc_howto_type * tic54x_coff_reloc_type_lookup
     50  PARAMS ((bfd *, bfd_reloc_code_real_type));
     51static void tic54x_lookup_howto
     52  PARAMS ((arelent *, struct internal_reloc *));
     53static bfd_boolean ticoff0_bad_format_hook
     54  PARAMS ((bfd *, PTR));
     55static bfd_boolean ticoff1_bad_format_hook
     56  PARAMS ((bfd *, PTR));
     57static bfd_boolean ticoff_bfd_is_local_label_name
     58  PARAMS ((bfd *, const char *));
     59
     60/* 32-bit operations
     61   The octet order is screwy.  words are LSB first (LS octet, actually), but
     62   longwords are MSW first.  For example, 0x12345678 is encoded 0x5678 in the
     63   first word and 0x1234 in the second.  When looking at the data as stored in
     64   the COFF file, you would see the octets ordered as 0x78, 0x56, 0x34, 0x12.
     65   Don't bother with 64-bits, as there aren't any.  */
     66
    4167static bfd_vma
    42 tic54x_getl32(addr)
    43   register const bfd_byte *addr;
     68tic54x_getl32 (addr)
     69  const bfd_byte *addr;
    4470{
    4571  unsigned long v;
    46   v = (unsigned long) addr[2];
     72
     73  v  = (unsigned long) addr[2];
    4774  v |= (unsigned long) addr[3] << 8;
    4875  v |= (unsigned long) addr[0] << 16;
     
    5481tic54x_putl32 (data, addr)
    5582     bfd_vma data;
    56      register bfd_byte *addr;
     83     bfd_byte *addr;
    5784{
    5885  addr[2] = (bfd_byte)data;
     
    6895  unsigned long v;
    6996
    70   v = (unsigned long) addr[2];
     97  v  = (unsigned long) addr[2];
    7198  v |= (unsigned long) addr[3] << 8;
    7299  v |= (unsigned long) addr[0] << 16;
     
    111138/* Set the architecture appropriately.  Allow unkown architectures
    112139   (e.g. binary).  */
    113 static boolean
     140
     141static bfd_boolean
    114142tic54x_set_arch_mach (abfd, arch, machine)
    115143     bfd *abfd;
     
    121149
    122150  else if (arch != bfd_arch_tic54x)
    123     return false;
     151    return FALSE;
    124152
    125153  return bfd_default_set_arch_mach (abfd, arch, machine);
     
    137165  char **error_message ATTRIBUTE_UNUSED;
    138166{
    139 
    140167  if (output_bfd != (bfd *) NULL)
    141168    {
     
    150177
    151178reloc_howto_type tic54x_howto_table[] =
    152 {
    153 /* type,rightshift,size (0=byte, 1=short, 2=long),
    154    bit size, pc_relative, bitpos, dont complain_on_overflow,
    155    special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset */
    156 
    157   /* NORMAL BANK */
    158   /* 16-bit direct reference to symbol's address */
    159   HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
    160          tic54x_relocation,"REL16",false,0xFFFF,0xFFFF,false),
    161 
    162   /* 7 LSBs of an address */
    163   HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
    164          tic54x_relocation,"LS7",false,0x007F,0x007F,false),
    165 
    166   /* 9 MSBs of an address */
    167   /* TI assembler doesn't shift its encoding, and is thus incompatible */
    168   HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
    169          tic54x_relocation,"MS9",false,0x01FF,0x01FF,false),
    170 
    171   /* 23-bit relocation */
    172   HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
    173          tic54x_relocation,"RELEXT",false,0x7FFFFF,0x7FFFFF,false),
    174 
    175   /* 16 bits of 23-bit extended address */
    176   HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
    177          tic54x_relocation,"RELEXT16",false,0x7FFFFF,0x7FFFFF,false),
    178 
    179   /* upper 7 bits of 23-bit extended address */
    180   HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
    181          tic54x_relocation,"RELEXTMS7",false,0x7F,0x7F,false),
    182 
    183   /* ABSOLUTE BANK */
    184   /* 16-bit direct reference to symbol's address, absolute */
    185   HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont,
    186          tic54x_relocation,"AREL16",false,0xFFFF,0xFFFF,false),
    187 
    188   /* 7 LSBs of an address, absolute */
    189   HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont,
    190          tic54x_relocation,"ALS7",false,0x007F,0x007F,false),
    191 
    192   /* 9 MSBs of an address, absolute */
    193   /* TI assembler doesn't shift its encoding, and is thus incompatible */
    194   HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont,
    195          tic54x_relocation,"AMS9",false,0x01FF,0x01FF,false),
    196 
    197   /* 23-bit direct reference, absolute */
    198   HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont,
    199          tic54x_relocation,"ARELEXT",false,0x7FFFFF,0x7FFFFF,false),
    200 
    201   /* 16 bits of 23-bit extended address, absolute */
    202   HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont,
    203          tic54x_relocation,"ARELEXT16",false,0x7FFFFF,0x7FFFFF,false),
    204 
    205   /* upper 7 bits of 23-bit extended address, absolute */
    206   HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont,
    207          tic54x_relocation,"ARELEXTMS7",false,0x7F,0x7F,false),
    208 
    209   /* 32-bit relocation exclusively for stabs */
    210   HOWTO (R_RELLONG,0,2,32,false,0,complain_overflow_dont,
    211          tic54x_relocation,"STAB",false,0xFFFFFFFF,0xFFFFFFFF,false),
    212 
    213 };
     179  {
     180    /* type,rightshift,size (0=byte, 1=short, 2=long),
     181       bit size, pc_relative, bitpos, dont complain_on_overflow,
     182       special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset.  */
     183
     184    /* NORMAL BANK */
     185    /* 16-bit direct reference to symbol's address.  */
     186    HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
     187           tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE),
     188
     189    /* 7 LSBs of an address */
     190    HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
     191           tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE),
     192
     193    /* 9 MSBs of an address */
     194    /* TI assembler doesn't shift its encoding, and is thus incompatible */
     195    HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
     196           tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE),
     197
     198    /* 23-bit relocation */
     199    HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
     200           tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
     201
     202    /* 16 bits of 23-bit extended address */
     203    HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
     204           tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
     205
     206    /* upper 7 bits of 23-bit extended address */
     207    HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
     208           tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE),
     209
     210    /* ABSOLUTE BANK */
     211    /* 16-bit direct reference to symbol's address, absolute */
     212    HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont,
     213           tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE),
     214
     215    /* 7 LSBs of an address, absolute */
     216    HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont,
     217           tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE),
     218
     219    /* 9 MSBs of an address, absolute */
     220    /* TI assembler doesn't shift its encoding, and is thus incompatible */
     221    HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont,
     222           tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE),
     223
     224    /* 23-bit direct reference, absolute */
     225    HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont,
     226           tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
     227
     228    /* 16 bits of 23-bit extended address, absolute */
     229    HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont,
     230           tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE),
     231
     232    /* upper 7 bits of 23-bit extended address, absolute */
     233    HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont,
     234           tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE),
     235
     236    /* 32-bit relocation exclusively for stabs */
     237    HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont,
     238           tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE),
     239  };
    214240
    215241#define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
    216242
    217243/* For the case statement use the code values used tc_gen_reloc (defined in
    218    bfd/reloc.c) to map to the howto table entries */
     244   bfd/reloc.c) to map to the howto table entries.  */
     245
    219246reloc_howto_type *
    220247tic54x_coff_reloc_type_lookup (abfd, code)
     
    244271
    245272/* Code to turn a r_type into a howto ptr, uses the above howto table.
    246    Called after some initial checking by the tic54x_rtype_to_howto fn below */
     273   Called after some initial checking by the tic54x_rtype_to_howto fn below.  */
     274
    247275static void
    248276tic54x_lookup_howto (internal, dst)
     
    252280  unsigned i;
    253281  int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
     282
    254283  for (i = 0; i < sizeof tic54x_howto_table/sizeof tic54x_howto_table[0]; i++)
    255284    {
     
    269298 tic54x_reloc_processing(RELENT,RELOC,SYMS,ABFD,SECT)
    270299
    271 static void tic54x_reloc_processing();
    272 
    273300#define coff_rtype_to_howto coff_tic54x_rtype_to_howto
    274301
     
    297324}
    298325
    299 static boolean
     326static bfd_boolean
    300327ticoff0_bad_format_hook (abfd, filehdr)
    301328     bfd * abfd ATTRIBUTE_UNUSED;
     
    305332
    306333  if (COFF0_BADMAG (*internal_f))
    307     return false;
    308 
    309   return true;
    310 }
    311 
    312 static boolean
     334    return FALSE;
     335
     336  return TRUE;
     337}
     338
     339static bfd_boolean
    313340ticoff1_bad_format_hook (abfd, filehdr)
    314341     bfd * abfd ATTRIBUTE_UNUSED;
     
    318345
    319346  if (COFF1_BADMAG (*internal_f))
    320     return false;
    321 
    322   return true;
    323 }
    324 
    325 /* replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
    326    labels */
    327 static boolean
     347    return FALSE;
     348
     349  return TRUE;
     350}
     351
     352/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
     353   labels.  */
     354
     355static bfd_boolean
    328356ticoff_bfd_is_local_label_name (abfd, name)
    329357  bfd *abfd ATTRIBUTE_UNUSED;
     
    331359{
    332360  if (TICOFF_LOCAL_LABEL_P(name))
    333     return true;
    334   return false;
     361    return TRUE;
     362  return FALSE;
    335363}
    336364
     
    340368   coff_bad_format_hook uses BADMAG, so set that for COFF2.  The COFF1
    341369   and COFF0 vectors use custom _bad_format_hook procs instead of setting
    342    BADMAG.
    343  */
     370   BADMAG.  */
    344371#define BADMAG(x) COFF2_BADMAG(x)
    345372#include "coffcode.h"
    346373
    347 static boolean
     374static bfd_boolean
    348375tic54x_set_section_contents (abfd, section, location, offset, bytes_to_do)
    349376     bfd *abfd;
     
    375402          (*_bfd_error_handler)
    376403            (_("%s: warning: illegal symbol index %ld in relocs"),
    377              bfd_get_filename (abfd), reloc->r_symndx);
     404             bfd_archive_filename (abfd), reloc->r_symndx);
    378405          relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
    379406          ptr = NULL;
     
    397424     modified, so we have to have a negative addend to compensate.
    398425
    399      Note that symbols which used to be common must be left alone */
    400 
    401   /* Calculate any reloc addend by looking at the symbol */
     426     Note that symbols which used to be common must be left alone. */
     427
     428  /* Calculate any reloc addend by looking at the symbol. */
    402429  CALC_ADDEND (abfd, ptr, *reloc, relent);
    403430
     
    405432  /* !!     relent->section = (asection *) NULL;*/
    406433
    407   /* Fill in the relent->howto field from reloc->r_type */
     434  /* Fill in the relent->howto field from reloc->r_type. */
    408435  tic54x_lookup_howto (relent, reloc);
    409436}
    410437
    411 /* COFF0 differs in file/section header size and relocation entry size */
    412 static CONST bfd_coff_backend_data ticoff0_swap_table =
    413 {
    414   coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
    415   coff_SWAP_aux_out, coff_SWAP_sym_out,
    416   coff_SWAP_lineno_out, coff_SWAP_reloc_out,
    417   coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
    418   coff_SWAP_scnhdr_out,
    419   FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
     438/* COFF0 differs in file/section header size and relocation entry size. */
     439static const bfd_coff_backend_data ticoff0_swap_table =
     440  {
     441    coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
     442    coff_SWAP_aux_out, coff_SWAP_sym_out,
     443    coff_SWAP_lineno_out, coff_SWAP_reloc_out,
     444    coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
     445    coff_SWAP_scnhdr_out,
     446    FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
    420447#ifdef COFF_LONG_FILENAMES
    421   true,
     448    TRUE,
    422449#else
    423   false,
     450    FALSE,
    424451#endif
    425452#ifdef COFF_LONG_SECTION_NAMES
    426   true,
     453    TRUE,
    427454#else
    428   false,
     455    FALSE,
    429456#endif
    430457#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
    431   true,
     458    TRUE,
    432459#else
    433   false,
     460    FALSE,
    434461#endif
    435462#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
    436   4,
     463    4,
    437464#else
    438   2,
     465    2,
    439466#endif
    440   COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
    441   coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
    442   coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
    443   coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
    444   coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
    445   coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
    446   coff_classify_symbol, coff_compute_section_file_positions,
    447   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
    448   coff_adjust_symndx, coff_link_add_one_symbol,
    449   coff_link_output_has_begun, coff_final_link_postscript
    450 };
    451 
    452 /* COFF1 differs in section header size */
    453 static CONST bfd_coff_backend_data ticoff1_swap_table =
    454 {
    455   coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
    456   coff_SWAP_aux_out, coff_SWAP_sym_out,
    457   coff_SWAP_lineno_out, coff_SWAP_reloc_out,
    458   coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
    459   coff_SWAP_scnhdr_out,
    460   FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
     467    COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
     468    coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
     469    coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
     470    coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
     471    coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
     472    coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
     473    coff_classify_symbol, coff_compute_section_file_positions,
     474    coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
     475    coff_adjust_symndx, coff_link_add_one_symbol,
     476    coff_link_output_has_begun, coff_final_link_postscript
     477  };
     478
     479/* COFF1 differs in section header size. */
     480static const bfd_coff_backend_data ticoff1_swap_table =
     481  {
     482    coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
     483    coff_SWAP_aux_out, coff_SWAP_sym_out,
     484    coff_SWAP_lineno_out, coff_SWAP_reloc_out,
     485    coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
     486    coff_SWAP_scnhdr_out,
     487    FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
    461488#ifdef COFF_LONG_FILENAMES
    462   true,
     489    TRUE,
    463490#else
    464   false,
     491    FALSE,
    465492#endif
    466493#ifdef COFF_LONG_SECTION_NAMES
    467   true,
     494    TRUE,
    468495#else
    469   false,
     496    FALSE,
    470497#endif
    471   COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
     498    COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
    472499#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
    473   true,
     500    TRUE,
    474501#else
    475   false,
     502    FALSE,
    476503#endif
    477504#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
    478   4,
     505    4,
    479506#else
    480   2,
     507    2,
    481508#endif
    482   coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
    483   coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
    484   coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
    485   coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
    486   coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
    487   coff_classify_symbol, coff_compute_section_file_positions,
    488   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
    489   coff_adjust_symndx, coff_link_add_one_symbol,
    490   coff_link_output_has_begun, coff_final_link_postscript
     509    coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
     510    coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
     511    coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
     512    coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
     513    coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
     514    coff_classify_symbol, coff_compute_section_file_positions,
     515    coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
     516    coff_adjust_symndx, coff_link_add_one_symbol,
     517    coff_link_output_has_begun, coff_final_link_postscript
     518  };
     519
     520/* TI COFF v0, DOS tools (little-endian headers).  */
     521const bfd_target tic54x_coff0_vec =
     522  {
     523    "coff0-c54x",                       /* name */
     524    bfd_target_coff_flavour,
     525    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     526    BFD_ENDIAN_LITTLE,          /* header byte order is little (DOS tools) */
     527
     528    (HAS_RELOC | EXEC_P |               /* object flags */
     529     HAS_LINENO | HAS_DEBUG |
     530     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     531
     532    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     533    '_',                                /* leading symbol underscore */
     534    '/',                                /* ar_pad_char */
     535    15,                         /* ar_max_namelen */
     536    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     537    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     538    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     539    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     540    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
     541    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
     542
     543    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     544     bfd_generic_archive_p, _bfd_dummy_target},
     545    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     546     bfd_false},
     547    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     548     _bfd_write_archive_contents, bfd_false},
     549
     550    BFD_JUMP_TABLE_GENERIC (coff),
     551    BFD_JUMP_TABLE_COPY (coff),
     552    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     553    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     554    BFD_JUMP_TABLE_SYMBOLS (coff),
     555    BFD_JUMP_TABLE_RELOCS (coff),
     556    BFD_JUMP_TABLE_WRITE (tic54x),
     557    BFD_JUMP_TABLE_LINK (coff),
     558    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     559    NULL,
     560
     561    (PTR) & ticoff0_swap_table
     562  };
     563
     564/* TI COFF v0, SPARC tools (big-endian headers).  */
     565const bfd_target tic54x_coff0_beh_vec =
     566  {
     567    "coff0-beh-c54x",                   /* name */
     568    bfd_target_coff_flavour,
     569    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     570    BFD_ENDIAN_BIG,             /* header byte order is big */
     571
     572    (HAS_RELOC | EXEC_P |               /* object flags */
     573     HAS_LINENO | HAS_DEBUG |
     574     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     575
     576    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     577    '_',                                /* leading symbol underscore */
     578    '/',                                /* ar_pad_char */
     579    15,                         /* ar_max_namelen */
     580    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     581    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     582    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     583    bfd_getb64, bfd_getb_signed_64, bfd_putb64,
     584    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
     585    bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
     586
     587    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     588     bfd_generic_archive_p, _bfd_dummy_target},
     589    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     590     bfd_false},
     591    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     592     _bfd_write_archive_contents, bfd_false},
     593
     594    BFD_JUMP_TABLE_GENERIC (coff),
     595    BFD_JUMP_TABLE_COPY (coff),
     596    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     597    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     598    BFD_JUMP_TABLE_SYMBOLS (coff),
     599    BFD_JUMP_TABLE_RELOCS (coff),
     600    BFD_JUMP_TABLE_WRITE (tic54x),
     601    BFD_JUMP_TABLE_LINK (coff),
     602    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     603
     604    & tic54x_coff0_vec,
     605
     606    (PTR) & ticoff0_swap_table
     607  };
     608
     609/* TI COFF v1, DOS tools (little-endian headers).  */
     610const bfd_target tic54x_coff1_vec =
     611  {
     612    "coff1-c54x",                       /* name */
     613    bfd_target_coff_flavour,
     614    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     615    BFD_ENDIAN_LITTLE,          /* header byte order is little (DOS tools) */
     616
     617    (HAS_RELOC | EXEC_P |               /* object flags */
     618     HAS_LINENO | HAS_DEBUG |
     619     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     620
     621    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     622    '_',                                /* leading symbol underscore */
     623    '/',                                /* ar_pad_char */
     624    15,                         /* ar_max_namelen */
     625    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     626    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     627    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     628    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     629    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
     630    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
     631
     632    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     633     bfd_generic_archive_p, _bfd_dummy_target},
     634    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     635     bfd_false},
     636    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     637     _bfd_write_archive_contents, bfd_false},
     638
     639    BFD_JUMP_TABLE_GENERIC (coff),
     640    BFD_JUMP_TABLE_COPY (coff),
     641    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     642    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     643    BFD_JUMP_TABLE_SYMBOLS (coff),
     644    BFD_JUMP_TABLE_RELOCS (coff),
     645    BFD_JUMP_TABLE_WRITE (tic54x),
     646    BFD_JUMP_TABLE_LINK (coff),
     647    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     648
     649    & tic54x_coff0_beh_vec,
     650
     651    (PTR) & ticoff1_swap_table
    491652};
    492653
    493 /* TI COFF v0, DOS tools (little-endian headers) */
    494 const bfd_target tic54x_coff0_vec =
    495 {
    496   "coff0-c54x",                 /* name */
    497   bfd_target_coff_flavour,
    498   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    499   BFD_ENDIAN_LITTLE,            /* header byte order is little (DOS tools) */
    500 
    501   (HAS_RELOC | EXEC_P |         /* object flags */
    502    HAS_LINENO | HAS_DEBUG |
    503    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    504 
    505   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    506   '_',                          /* leading symbol underscore */
    507   '/',                          /* ar_pad_char */
    508   15,                           /* ar_max_namelen */
    509   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    510   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    511   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    512   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    513   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
    514   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* hdrs */
    515 
    516   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    517    bfd_generic_archive_p, _bfd_dummy_target},
    518   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    519    bfd_false},
    520   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    521    _bfd_write_archive_contents, bfd_false},
    522 
    523   BFD_JUMP_TABLE_GENERIC (coff),
    524   BFD_JUMP_TABLE_COPY (coff),
    525   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    526   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    527   BFD_JUMP_TABLE_SYMBOLS (coff),
    528   BFD_JUMP_TABLE_RELOCS (coff),
    529   BFD_JUMP_TABLE_WRITE (tic54x),
    530   BFD_JUMP_TABLE_LINK (coff),
    531   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    532   NULL,
    533 
    534   (PTR)&ticoff0_swap_table
    535 };
    536 
    537 /* TI COFF v0, SPARC tools (big-endian headers) */
    538 const bfd_target tic54x_coff0_beh_vec =
    539 {
    540   "coff0-beh-c54x",                     /* name */
    541   bfd_target_coff_flavour,
    542   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    543   BFD_ENDIAN_BIG,               /* header byte order is big */
    544 
    545   (HAS_RELOC | EXEC_P |         /* object flags */
    546    HAS_LINENO | HAS_DEBUG |
    547    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    548 
    549   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    550   '_',                          /* leading symbol underscore */
    551   '/',                          /* ar_pad_char */
    552   15,                           /* ar_max_namelen */
    553   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    554   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    555   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    556   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
    557   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
    558   bfd_getb16, bfd_getb_signed_16, bfd_putb16,   /* hdrs */
    559 
    560   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    561    bfd_generic_archive_p, _bfd_dummy_target},
    562   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    563    bfd_false},
    564   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    565    _bfd_write_archive_contents, bfd_false},
    566 
    567   BFD_JUMP_TABLE_GENERIC (coff),
    568   BFD_JUMP_TABLE_COPY (coff),
    569   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    570   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    571   BFD_JUMP_TABLE_SYMBOLS (coff),
    572   BFD_JUMP_TABLE_RELOCS (coff),
    573   BFD_JUMP_TABLE_WRITE (tic54x),
    574   BFD_JUMP_TABLE_LINK (coff),
    575   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    576 
    577   &tic54x_coff0_vec,
    578 
    579   (PTR)&ticoff0_swap_table
    580 };
    581 
    582 /* TI COFF v1, DOS tools (little-endian headers) */
    583 const bfd_target tic54x_coff1_vec =
    584 {
    585   "coff1-c54x",                 /* name */
    586   bfd_target_coff_flavour,
    587   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    588   BFD_ENDIAN_LITTLE,            /* header byte order is little (DOS tools) */
    589 
    590   (HAS_RELOC | EXEC_P |         /* object flags */
    591    HAS_LINENO | HAS_DEBUG |
    592    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    593 
    594   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    595   '_',                          /* leading symbol underscore */
    596   '/',                          /* ar_pad_char */
    597   15,                           /* ar_max_namelen */
    598   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    599   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    600   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    601   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    602   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
    603   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* hdrs */
    604 
    605   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    606    bfd_generic_archive_p, _bfd_dummy_target},
    607   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    608    bfd_false},
    609   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    610    _bfd_write_archive_contents, bfd_false},
    611 
    612   BFD_JUMP_TABLE_GENERIC (coff),
    613   BFD_JUMP_TABLE_COPY (coff),
    614   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    615   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    616   BFD_JUMP_TABLE_SYMBOLS (coff),
    617   BFD_JUMP_TABLE_RELOCS (coff),
    618   BFD_JUMP_TABLE_WRITE (tic54x),
    619   BFD_JUMP_TABLE_LINK (coff),
    620   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    621 
    622   &tic54x_coff0_beh_vec,
    623 
    624   (PTR)&ticoff1_swap_table
    625 };
    626 
    627 /* TI COFF v1, SPARC tools (big-endian headers) */
     654/* TI COFF v1, SPARC tools (big-endian headers).  */
    628655const bfd_target tic54x_coff1_beh_vec =
    629 {
    630   "coff1-beh-c54x",                     /* name */
    631   bfd_target_coff_flavour,
    632   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    633   BFD_ENDIAN_BIG,               /* header byte order is big */
    634 
    635   (HAS_RELOC | EXEC_P |         /* object flags */
    636    HAS_LINENO | HAS_DEBUG |
    637    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    638 
    639   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    640   '_',                          /* leading symbol underscore */
    641   '/',                          /* ar_pad_char */
    642   15,                           /* ar_max_namelen */
    643   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    644   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    645   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    646   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
    647   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
    648   bfd_getb16, bfd_getb_signed_16, bfd_putb16,   /* hdrs */
    649 
    650   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    651    bfd_generic_archive_p, _bfd_dummy_target},
    652   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    653    bfd_false},
    654   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    655    _bfd_write_archive_contents, bfd_false},
    656 
    657   BFD_JUMP_TABLE_GENERIC (coff),
    658   BFD_JUMP_TABLE_COPY (coff),
    659   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    660   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    661   BFD_JUMP_TABLE_SYMBOLS (coff),
    662   BFD_JUMP_TABLE_RELOCS (coff),
    663   BFD_JUMP_TABLE_WRITE (tic54x),
    664   BFD_JUMP_TABLE_LINK (coff),
    665   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    666 
    667   &tic54x_coff1_vec,
    668 
    669   (PTR)&ticoff1_swap_table
    670 };
    671 
    672 /* TI COFF v2, TI DOS tools output (little-endian headers) */
     656  {
     657    "coff1-beh-c54x",                   /* name */
     658    bfd_target_coff_flavour,
     659    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     660    BFD_ENDIAN_BIG,             /* header byte order is big */
     661
     662    (HAS_RELOC | EXEC_P |               /* object flags */
     663     HAS_LINENO | HAS_DEBUG |
     664     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     665
     666    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     667    '_',                                /* leading symbol underscore */
     668    '/',                                /* ar_pad_char */
     669    15,                         /* ar_max_namelen */
     670    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     671    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     672    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     673    bfd_getb64, bfd_getb_signed_64, bfd_putb64,
     674    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
     675    bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
     676
     677    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     678     bfd_generic_archive_p, _bfd_dummy_target},
     679    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     680     bfd_false},
     681    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     682     _bfd_write_archive_contents, bfd_false},
     683
     684    BFD_JUMP_TABLE_GENERIC (coff),
     685    BFD_JUMP_TABLE_COPY (coff),
     686    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     687    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     688    BFD_JUMP_TABLE_SYMBOLS (coff),
     689    BFD_JUMP_TABLE_RELOCS (coff),
     690    BFD_JUMP_TABLE_WRITE (tic54x),
     691    BFD_JUMP_TABLE_LINK (coff),
     692    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     693
     694    & tic54x_coff1_vec,
     695
     696    (PTR) & ticoff1_swap_table
     697  };
     698
     699/* TI COFF v2, TI DOS tools output (little-endian headers). */
    673700const bfd_target tic54x_coff2_vec =
    674 {
    675   "coff2-c54x",                 /* name */
    676   bfd_target_coff_flavour,
    677   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    678   BFD_ENDIAN_LITTLE,            /* header byte order is little (DOS tools) */
    679 
    680   (HAS_RELOC | EXEC_P |         /* object flags */
    681    HAS_LINENO | HAS_DEBUG |
    682    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    683 
    684   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    685   '_',                          /* leading symbol underscore */
    686   '/',                          /* ar_pad_char */
    687   15,                           /* ar_max_namelen */
    688   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    689   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    690   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    691   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    692   bfd_getl32, bfd_getl_signed_32, bfd_putl32,
    693   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* hdrs */
    694 
    695   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    696    bfd_generic_archive_p, _bfd_dummy_target},
    697   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    698    bfd_false},
    699   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    700    _bfd_write_archive_contents, bfd_false},
    701 
    702   BFD_JUMP_TABLE_GENERIC (coff),
    703   BFD_JUMP_TABLE_COPY (coff),
    704   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    705   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    706   BFD_JUMP_TABLE_SYMBOLS (coff),
    707   BFD_JUMP_TABLE_RELOCS (coff),
    708   BFD_JUMP_TABLE_WRITE (tic54x),
    709   BFD_JUMP_TABLE_LINK (coff),
    710   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    711 
    712   &tic54x_coff1_beh_vec,
    713 
    714   COFF_SWAP_TABLE
    715 };
    716 
    717 /* TI COFF v2, TI SPARC tools output (big-endian headers) */
     701  {
     702    "coff2-c54x",                       /* name */
     703    bfd_target_coff_flavour,
     704    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     705    BFD_ENDIAN_LITTLE,          /* header byte order is little (DOS tools) */
     706
     707    (HAS_RELOC | EXEC_P |               /* object flags */
     708     HAS_LINENO | HAS_DEBUG |
     709     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     710
     711    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     712    '_',                                /* leading symbol underscore */
     713    '/',                                /* ar_pad_char */
     714    15,                         /* ar_max_namelen */
     715    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     716    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     717    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     718    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     719    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
     720    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
     721
     722    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     723     bfd_generic_archive_p, _bfd_dummy_target},
     724    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     725     bfd_false},
     726    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     727     _bfd_write_archive_contents, bfd_false},
     728
     729    BFD_JUMP_TABLE_GENERIC (coff),
     730    BFD_JUMP_TABLE_COPY (coff),
     731    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     732    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     733    BFD_JUMP_TABLE_SYMBOLS (coff),
     734    BFD_JUMP_TABLE_RELOCS (coff),
     735    BFD_JUMP_TABLE_WRITE (tic54x),
     736    BFD_JUMP_TABLE_LINK (coff),
     737    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     738
     739    & tic54x_coff1_beh_vec,
     740
     741    COFF_SWAP_TABLE
     742  };
     743
     744/* TI COFF v2, TI SPARC tools output (big-endian headers). */
    718745const bfd_target tic54x_coff2_beh_vec =
    719 {
    720   "coff2-beh-c54x",                     /* name */
    721   bfd_target_coff_flavour,
    722   BFD_ENDIAN_LITTLE,            /* data byte order is little */
    723   BFD_ENDIAN_BIG,               /* header byte order is big */
    724 
    725   (HAS_RELOC | EXEC_P |         /* object flags */
    726    HAS_LINENO | HAS_DEBUG |
    727    HAS_SYMS | HAS_LOCALS | WP_TEXT ),
    728 
    729   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
    730   '_',                          /* leading symbol underscore */
    731   '/',                          /* ar_pad_char */
    732   15,                           /* ar_max_namelen */
    733   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
    734   tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
    735   bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* data */
    736   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
    737   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
    738   bfd_getb16, bfd_getb_signed_16, bfd_putb16,   /* hdrs */
    739 
    740   {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
    741    bfd_generic_archive_p, _bfd_dummy_target},
    742   {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /* bfd_set_format */
    743    bfd_false},
    744   {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
    745    _bfd_write_archive_contents, bfd_false},
    746 
    747   BFD_JUMP_TABLE_GENERIC (coff),
    748   BFD_JUMP_TABLE_COPY (coff),
    749   BFD_JUMP_TABLE_CORE (_bfd_nocore),
    750   BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
    751   BFD_JUMP_TABLE_SYMBOLS (coff),
    752   BFD_JUMP_TABLE_RELOCS (coff),
    753   BFD_JUMP_TABLE_WRITE (tic54x),
    754   BFD_JUMP_TABLE_LINK (coff),
    755   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
    756 
    757   &tic54x_coff2_vec,
    758 
    759   COFF_SWAP_TABLE
    760 };
     746  {
     747    "coff2-beh-c54x",                   /* name */
     748    bfd_target_coff_flavour,
     749    BFD_ENDIAN_LITTLE,          /* data byte order is little */
     750    BFD_ENDIAN_BIG,             /* header byte order is big */
     751
     752    (HAS_RELOC | EXEC_P |               /* object flags */
     753     HAS_LINENO | HAS_DEBUG |
     754     HAS_SYMS | HAS_LOCALS | WP_TEXT ),
     755
     756    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
     757    '_',                                /* leading symbol underscore */
     758    '/',                                /* ar_pad_char */
     759    15,                         /* ar_max_namelen */
     760    bfd_getl64, bfd_getl_signed_64, bfd_putl64,
     761    tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32,
     762    bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
     763    bfd_getb64, bfd_getb_signed_64, bfd_putb64,
     764    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
     765    bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
     766
     767    {_bfd_dummy_target, coff_object_p,  /* bfd_check_format */
     768     bfd_generic_archive_p, _bfd_dummy_target},
     769    {bfd_false, coff_mkobject, _bfd_generic_mkarchive,  /* bfd_set_format */
     770     bfd_false},
     771    {bfd_false, coff_write_object_contents,     /* bfd_write_contents */
     772     _bfd_write_archive_contents, bfd_false},
     773
     774    BFD_JUMP_TABLE_GENERIC (coff),
     775    BFD_JUMP_TABLE_COPY (coff),
     776    BFD_JUMP_TABLE_CORE (_bfd_nocore),
     777    BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
     778    BFD_JUMP_TABLE_SYMBOLS (coff),
     779    BFD_JUMP_TABLE_RELOCS (coff),
     780    BFD_JUMP_TABLE_WRITE (tic54x),
     781    BFD_JUMP_TABLE_LINK (coff),
     782    BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
     783
     784    & tic54x_coff2_vec,
     785
     786    COFF_SWAP_TABLE
     787  };
Note: See TracChangeset for help on using the changeset viewer.