1 /* MIPS Extended-Coff handler for Binary File Diddling.
2 Written by Per Bothner. */
4 /* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
6 This file is part of BFD, the Binary File Diddler.
8 BFD 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 1, or (at your option)
13 BFD 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 BFD; see the file COPYING. If not, write to
20 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 /* This does not compile on anything but a MIPS yet (and I haven't been
23 able to test it there either since the latest merge!). So it stays
34 #include "intel-coff.h"
35 #include "libcoff.h" /* to allow easier abstraction-breaking */
37 #define BADMAG(x) ECOFFBADMAG(x)
39 #include "coff-code.h"
40 bfd_target ecoff_little_vec
=
41 {"ecoff-littlemips", /* name */
42 bfd_target_coff_flavour_enum
,
43 false, /* data byte order is little */
44 false, /* header byte order is little */
46 (HAS_RELOC
| EXEC_P
| /* object flags */
47 HAS_LINENO
| HAS_DEBUG
|
48 HAS_SYMS
| HAS_LOCALS
| DYNAMIC
| WP_TEXT
),
50 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* sect flags */
51 '/', /* ar_pad_char */
52 15, /* ar_max_namelen */
53 _do_getllong
, _do_putllong
, _do_getlshort
, _do_putlshort
, /* data */
54 _do_getllong
, _do_putllong
, _do_getlshort
, _do_putlshort
, /* hdrs */
56 {_bfd_dummy_target
, coff_object_p
, /* bfd_check_format */
57 bfd_generic_archive_p
, _bfd_dummy_target
},
58 {bfd_false
, coff_mkobject
, bfd_false
, /* bfd_set_format */
60 {bfd_false
, coff_write_object_contents
, bfd_false
, bfd_false
},
64 bfd_target ecoff_big_vec
=
65 {"ecoff-bigmips", /* name */
66 bfd_target_coff_flavour_enum
,
67 true, /* data byte order is big */
68 true, /* header byte order is big */
70 (HAS_RELOC
| EXEC_P
| /* object flags */
71 HAS_LINENO
| HAS_DEBUG
|
72 HAS_SYMS
| HAS_LOCALS
| DYNAMIC
| WP_TEXT
),
74 (SEC_HAS_CONTENTS
| SEC_ALLOC
| SEC_LOAD
| SEC_RELOC
), /* sect flags */
75 ' ', /* ar_pad_char */
76 16, /* ar_max_namelen */
77 _do_getblong
, _do_putblong
, _do_getbshort
, _do_putbshort
, /* data */
78 _do_getblong
, _do_putblong
, _do_getbshort
, _do_putbshort
, /* hdrs */
80 {_bfd_dummy_target
, coff_object_p
, /* bfd_check_format */
81 bfd_generic_archive_p
, _bfd_dummy_target
},
82 {bfd_false
, coff_mkobject
, bfd_false
, /* bfd_set_format */
84 {bfd_false
, coff_write_object_contents
, /* bfd_write_contents */
85 bfd_false
, bfd_false
},