* coff-tic80.c (tic80coff_vec): Change to little endian data
[platform/upstream/binutils.git] / bfd / coff-tic80.c
1 /* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
2    Copyright 1996 Free Software Foundation, Inc.
3
4    Written by Fred Fish (fnf@cygnus.com)
5
6    There is nothing new under the sun. This file draws a lot on other
7    coff files.
8
9 This file is part of BFD, the Binary File Descriptor library.
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
24
25 #include "bfd.h"
26 #include "sysdep.h"
27 #include "libbfd.h"
28 #include "obstack.h"
29 #include "coff/tic80.h"
30 #include "coff/internal.h"
31 #include "libcoff.h"
32
33 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (4)        /* FIXME: What should this be? */
34
35 #define coff_relocate_section _bfd_coff_generic_relocate_section
36
37 #define RTYPE2HOWTO(internal, relocentry) abort()       /* FIXME: hack */
38
39 #ifndef BADMAG
40 #define BADMAG(x) TIC80BADMAG(x)
41 #endif
42
43 #define TIC80 1         /* Customize coffcode.h */
44 #include "coffcode.h"
45
46 const bfd_target 
47 #ifdef TARGET_SYM
48   TARGET_SYM =
49 #else
50   tic80coff_vec =
51 #endif
52 {
53 #ifdef TARGET_NAME
54   TARGET_NAME,
55 #else
56   "coff-tic80",                 /* name */
57 #endif
58   bfd_target_coff_flavour,
59   BFD_ENDIAN_LITTLE,            /* data byte order is little (arch supports both) */
60   BFD_ENDIAN_LITTLE,            /* header byte order is little */
61
62   (HAS_RELOC | EXEC_P |         /* object flags */
63    HAS_LINENO | HAS_DEBUG |
64    HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
65
66   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
67 #ifdef NAMES_HAVE_UNDERSCORE
68   '_',
69 #else
70   0,                            /* leading underscore */
71 #endif
72   '/',                          /* ar_pad_char */
73   15,                           /* ar_max_namelen */
74   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
75      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
76      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
77   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
78      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
79      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
80
81  {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
82    bfd_generic_archive_p, _bfd_dummy_target},
83  {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
84    bfd_false},
85  {bfd_false, coff_write_object_contents, /* bfd_write_contents */
86    _bfd_write_archive_contents, bfd_false},
87
88      BFD_JUMP_TABLE_GENERIC (coff),
89      BFD_JUMP_TABLE_COPY (coff),
90      BFD_JUMP_TABLE_CORE (_bfd_nocore),
91      BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
92      BFD_JUMP_TABLE_SYMBOLS (coff),
93      BFD_JUMP_TABLE_RELOCS (coff),
94      BFD_JUMP_TABLE_WRITE (coff),
95      BFD_JUMP_TABLE_LINK (coff),
96      BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
97
98   COFF_SWAP_TABLE
99  };