* Makefile.in (DEMANGLING_STYLE): New define to set default
[deliverable/binutils-gdb.git] / bfd / coff-mips.c
CommitLineData
68b70212
JG
1/* MIPS Extended-Coff back-end for BFD.
2 Copyright (C) 1990-1991 Free Software Foundation, Inc.
3 Written by Per Bothner.
1327fb29 4
68b70212 5This file is part of BFD, the Binary File Descriptor library.
23b0b558 6
68b70212 7This program is free software; you can redistribute it and/or modify
23b0b558 8it under the terms of the GNU General Public License as published by
68b70212
JG
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
23b0b558 11
68b70212 12This program is distributed in the hope that it will be useful,
23b0b558
JG
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
68b70212
JG
18along with this program; if not, write to the Free Software
19Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1327fb29 20
23b0b558 21#include "bfd.h"
dd4646ca 22#include "sysdep.h"
1327fb29 23#include "libbfd.h"
853f0a70 24#include "coff-mips.h"
41f50af0 25#include "internalcoff.h"
23b0b558 26#include "libcoff.h" /* to allow easier abstraction-breaking */
68b70212 27#include "trad-core.h"
1327fb29 28
8e3c8f47 29#define BADMAG(x) ECOFFBADMAG(x)
2b1d8a50 30
c9301d7b
SC
31/* Can't read these relocs */
32#define RTYPE2HOWTO(a,b) ;
68b70212
JG
33/* Define NO_COFF_SYMBOLS and NO_COFF_LINENOS to avoid coffcode.h
34 defining a mess of useless functions. */
35#define NO_COFF_SYMBOLS
36#define NO_COFF_LINENOS
dd4646ca
JG
37/* Define MIPS to get MIPS magic numbers and such */
38#define MIPS 1
853f0a70
JG
39/* Define additional MIPS section types */
40#define STYP_OTHER_LOAD 0x98000300
7ed4093a 41#include "coffcode.h"
68b70212 42
68b70212
JG
43/* We do not implement symbols for ecoff. */
44#define coff_get_symtab_upper_bound (PROTO(unsigned int, (*),(bfd *)))bfd_false
45#define coff_get_symtab (PROTO(unsigned int, (*), (bfd *, asymbol **)))bfd_0
46#define coff_print_symbol \
47 (PROTO(void,(*),(bfd *, PTR, asymbol *, enum bfd_print_symbol))) bfd_void
48#define coff_swap_sym_in (PROTO(void,(*),(bfd *,PTR,PTR))) bfd_void
dd4646ca 49#define coff_swap_aux_in (PROTO(void,(*),(bfd *,PTR,int,int,PTR))) bfd_void
853f0a70
JG
50#define coff_swap_sym_out (PROTO(unsigned,(*),(bfd *,PTR,PTR))) bfd_void
51#define coff_swap_aux_out (PROTO(unsigned,(*),(bfd *,PTR,int,int,PTR))) bfd_void
68b70212
JG
52
53/* We do not implement linenos for ecoff. */
54#define coff_get_lineno (struct lineno_cache_entry *(*)()) bfd_nullvoidptr
55#define coff_swap_lineno_in (PROTO(void,(*),(bfd *,PTR,PTR))) bfd_void
56#define coff_find_nearest_line (PROTO(boolean, (*),(bfd*,asection*,asymbol**,bfd_vma, CONST char**, CONST char**, unsigned int *))) bfd_false
853f0a70 57#define coff_swap_lineno_out (PROTO(unsigned,(*),(bfd *,PTR,PTR))) bfd_void
c9301d7b 58
1327fb29
SC
59bfd_target ecoff_little_vec =
60 {"ecoff-littlemips", /* name */
dd4646ca 61 bfd_target_coff_flavour,
2b1d8a50
JG
62 false, /* data byte order is little */
63 false, /* header byte order is little */
1327fb29 64
2b1d8a50
JG
65 (HAS_RELOC | EXEC_P | /* object flags */
66 HAS_LINENO | HAS_DEBUG |
67 HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT),
1327fb29 68
2b1d8a50
JG
69 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* sect flags */
70 '/', /* ar_pad_char */
71 15, /* ar_max_namelen */
41f50af0 72 3, /* minimum alignment power */
19b03b7a
SC
73_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* data */
74_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* hdrs */
1327fb29 75
8e3c8f47 76 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
1327fb29 77 bfd_generic_archive_p, _bfd_dummy_target},
8e3c8f47 78 {bfd_false, coff_mkobject, bfd_false, /* bfd_set_format */
1327fb29 79 bfd_false},
8e3c8f47
SC
80 {bfd_false, coff_write_object_contents, bfd_false, bfd_false},
81 JUMP_TABLE (coff)
23b0b558 82};
1327fb29
SC
83
84bfd_target ecoff_big_vec =
85 {"ecoff-bigmips", /* name */
dd4646ca 86 bfd_target_coff_flavour,
2b1d8a50
JG
87 true, /* data byte order is big */
88 true, /* header byte order is big */
1327fb29 89
2b1d8a50
JG
90 (HAS_RELOC | EXEC_P | /* object flags */
91 HAS_LINENO | HAS_DEBUG |
92 HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT),
1327fb29 93
2b1d8a50
JG
94 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* sect flags */
95 ' ', /* ar_pad_char */
96 16, /* ar_max_namelen */
41f50af0 97 3, /* minimum alignment power */
dd4646ca
JG
98 _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16,
99 _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16,
8e3c8f47 100 {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
dd4646ca 101 bfd_generic_archive_p, _bfd_dummy_target},
8e3c8f47 102 {bfd_false, coff_mkobject, bfd_false, /* bfd_set_format */
1327fb29 103 bfd_false},
8e3c8f47 104 {bfd_false, coff_write_object_contents, /* bfd_write_contents */
2b1d8a50 105 bfd_false, bfd_false},
2700c3c7
SC
106 JUMP_TABLE(coff),
107 COFF_SWAP_TABLE
23b0b558 108};
This page took 0.076456 seconds and 4 git commands to generate.