This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c55x port howto?


Hi,
I need to extend bfd backend to support TI C55x COFF files. I have
copied the *c54x* and renamed them to *c55x*. In doing so I can run
objdump on a c55x file format but the section data has the wrong
endianess. I haven't been able to affect the section data format.

The cpu-tic55x.c looks like:
const bfd_arch_info_type bfd_tic55x_arch =
{
  16,                           /* 16 bits in a word */
  16,                           /* 16 bits in an address (except '548)
*/
  8,                            /* 16 bits in a byte */
  bfd_arch_tic55x,
  0,                            /* only 1 machine */
  "tic55x",
  "tms320c55x",
  1,
  true,                         /* the one and only */
  bfd_default_compatible,
  bfd_default_scan,
  0,
};


and the bfd_target looks like:
const bfd_target tic55x_coff2_vec =
{
  "coff2-c55x",                 /* name */
  bfd_target_coff_flavour,
  BFD_ENDIAN_BIG,            /* data byte order is little */
  BFD_ENDIAN_LITTLE,            /* header byte order is little (DOS
tools) */
  
  (HAS_RELOC | EXEC_P |         /* object flags */
   HAS_LINENO | HAS_DEBUG |
   HAS_SYMS | HAS_LOCALS | WP_TEXT ),
   
  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section
flags */
  '_',                          /* leading symbol underscore */
  '/',                          /* ar_pad_char */ 
  15,                           /* ar_max_namelen */
  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
  bfd_getb32, bfd_getb_signed_32, bfd_putb32,
  bfd_getb16, bfd_getb_signed_16, bfd_putb16,   /* data */
  bfd_getl64, bfd_getl_signed_64, bfd_putl64,   
  bfd_getl32, bfd_getl_signed_32, bfd_putl32,
  bfd_getl16, bfd_getl_signed_16, bfd_putl16,   /* hdrs */
  
  {_bfd_dummy_target, coff_object_p,    /* bfd_check_format */
   bfd_generic_archive_p, _bfd_dummy_target},
  {bfd_false, coff_mkobject, _bfd_generic_mkarchive,    /*
bfd_set_format */
   bfd_false},
  {bfd_false, coff_write_object_contents,       /* bfd_write_contents */
   _bfd_write_archive_contents, bfd_false},
   
  BFD_JUMP_TABLE_GENERIC (coff),
  BFD_JUMP_TABLE_COPY (coff),
  BFD_JUMP_TABLE_CORE (_bfd_nocore),
  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
  BFD_JUMP_TABLE_SYMBOLS (coff),
  BFD_JUMP_TABLE_RELOCS (coff),
  BFD_JUMP_TABLE_WRITE (tic55x),
  BFD_JUMP_TABLE_LINK (coff),
  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),

  NULL,

  COFF_SWAP_TABLE
};


Please email me with any response.

-Jaspreet


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]