1991-04-24 00:59:23 +09:00
|
|
|
/* MIPS Extended-Coff handler for Binary File Diddling.
|
1991-05-05 07:52:03 +09:00
|
|
|
Written by Per Bothner. */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-03 08:10:23 +09:00
|
|
|
/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
This file is part of BFD, the Binary File Diddler.
|
|
|
|
|
|
|
|
BFD is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
BFD is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with BFD; see the file COPYING. If not, write to
|
|
|
|
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
|
|
|
/* This does not compile on anything but a MIPS yet (and I haven't been
|
|
|
|
able to test it there either since the latest merge!). So it stays
|
|
|
|
out by default. */
|
|
|
|
|
1991-05-21 09:14:16 +09:00
|
|
|
#include <sysdep.h>
|
1991-04-24 00:59:23 +09:00
|
|
|
#define MIPS 1
|
1991-05-03 08:10:23 +09:00
|
|
|
#include "bfd.h"
|
1991-04-24 00:59:23 +09:00
|
|
|
#include "libbfd.h"
|
1991-05-18 11:57:45 +09:00
|
|
|
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-07-16 08:30:28 +09:00
|
|
|
#include "ecoff.h"
|
|
|
|
#include "internalcoff.h"
|
1991-05-03 08:10:23 +09:00
|
|
|
#include "libcoff.h" /* to allow easier abstraction-breaking */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 11:22:21 +09:00
|
|
|
#define BADMAG(x) ECOFFBADMAG(x)
|
1991-05-11 09:38:47 +09:00
|
|
|
|
1991-05-21 09:14:16 +09:00
|
|
|
#include "coffcode.h"
|
1991-04-24 00:59:23 +09:00
|
|
|
bfd_target ecoff_little_vec =
|
|
|
|
{"ecoff-littlemips", /* name */
|
1991-05-11 09:38:47 +09:00
|
|
|
bfd_target_coff_flavour_enum,
|
|
|
|
false, /* data byte order is little */
|
|
|
|
false, /* header byte order is little */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 09:38:47 +09:00
|
|
|
(HAS_RELOC | EXEC_P | /* object flags */
|
|
|
|
HAS_LINENO | HAS_DEBUG |
|
|
|
|
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT),
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 09:38:47 +09:00
|
|
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* sect flags */
|
|
|
|
'/', /* ar_pad_char */
|
|
|
|
15, /* ar_max_namelen */
|
1991-07-16 08:30:28 +09:00
|
|
|
3, /* minimum alignment power */
|
1991-05-18 11:57:45 +09:00
|
|
|
_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* data */
|
|
|
|
_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* hdrs */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 11:22:21 +09:00
|
|
|
{_bfd_dummy_target, coff_object_p, /* bfd_check_format */
|
1991-04-24 00:59:23 +09:00
|
|
|
bfd_generic_archive_p, _bfd_dummy_target},
|
1991-05-11 11:22:21 +09:00
|
|
|
{bfd_false, coff_mkobject, bfd_false, /* bfd_set_format */
|
1991-04-24 00:59:23 +09:00
|
|
|
bfd_false},
|
1991-05-11 11:22:21 +09:00
|
|
|
{bfd_false, coff_write_object_contents, bfd_false, bfd_false},
|
|
|
|
JUMP_TABLE (coff)
|
1991-05-03 08:10:23 +09:00
|
|
|
};
|
1991-04-24 00:59:23 +09:00
|
|
|
|
|
|
|
bfd_target ecoff_big_vec =
|
|
|
|
{"ecoff-bigmips", /* name */
|
1991-05-11 09:38:47 +09:00
|
|
|
bfd_target_coff_flavour_enum,
|
|
|
|
true, /* data byte order is big */
|
|
|
|
true, /* header byte order is big */
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 09:38:47 +09:00
|
|
|
(HAS_RELOC | EXEC_P | /* object flags */
|
|
|
|
HAS_LINENO | HAS_DEBUG |
|
|
|
|
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT),
|
1991-04-24 00:59:23 +09:00
|
|
|
|
1991-05-11 09:38:47 +09:00
|
|
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* sect flags */
|
|
|
|
' ', /* ar_pad_char */
|
|
|
|
16, /* ar_max_namelen */
|
1991-07-16 08:30:28 +09:00
|
|
|
3, /* minimum alignment power */
|
1991-05-18 11:57:45 +09:00
|
|
|
_do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* data */
|
|
|
|
_do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs */
|
1991-05-11 11:22:21 +09:00
|
|
|
{_bfd_dummy_target, coff_object_p, /* bfd_check_format */
|
1991-04-24 00:59:23 +09:00
|
|
|
bfd_generic_archive_p, _bfd_dummy_target},
|
1991-05-11 11:22:21 +09:00
|
|
|
{bfd_false, coff_mkobject, bfd_false, /* bfd_set_format */
|
1991-04-24 00:59:23 +09:00
|
|
|
bfd_false},
|
1991-05-11 11:22:21 +09:00
|
|
|
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
|
1991-05-11 09:38:47 +09:00
|
|
|
bfd_false, bfd_false},
|
1991-05-31 07:33:01 +09:00
|
|
|
JUMP_TABLE(coff),
|
|
|
|
COFF_SWAP_TABLE
|
1991-05-03 08:10:23 +09:00
|
|
|
};
|