Cleanups of interface, including close_and_cleanup and write_contents
[binutils-gdb.git] / bfd / targets.c
1 /* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
2
3 This file is part of BFD, the Binary File Diddler.
4
5 BFD is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 1, or (at your option)
8 any later version.
9
10 BFD is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with BFD; see the file COPYING. If not, write to
17 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19 /* $Id$ */
20
21
22 /* This -*- C -*- source file will someday be machine-generated */
23
24 /*** Defines the target vector through which operations dispatch */
25 #include "sysdep.h"
26 #include "bfd.h"
27 #include "libbfd.h"
28
29 extern bfd_target ecoff_little_vec;
30 extern bfd_target ecoff_big_vec;
31 extern bfd_target sunos_big_vec;
32 extern bfd_target srec_vec;
33 extern bfd_target b_out_vec_little_host;
34 extern bfd_target b_out_vec_big_host;
35 extern bfd_target icoff_little_vec;
36 extern bfd_target icoff_big_vec;
37 extern bfd_target ieee_vec;
38 extern bfd_target oasys_vec;
39 extern bfd_target m88k_bcs_vec;
40 extern bfd_target m68kcoff_vec;
41
42 #ifdef GNU960
43 #define ICOFF_LITTLE_VEC icoff_little_vec
44 #define ICOFF_BIG_VEC icoff_big_vec
45 #define B_OUT_VEC_LITTLE_HOST b_out_vec_little_host
46 #define B_OUT_VEC_BIG_HOST b_out_vec_big_host
47 #endif /* GNU960 */
48
49 #ifndef RESTRICTED
50 #define ECOFF_LITTLE_VEC ecoff_little_vec
51 #define ECOFF_BIG_VEC ecoff_big_vec
52 #define ICOFF_LITTLE_VEC icoff_little_vec
53 #define ICOFF_BIG_VEC icoff_big_vec
54 #define B_OUT_VEC_LITTLE_HOST b_out_vec_little_host
55 #define B_OUT_VEC_BIG_HOST b_out_vec_big_host
56 #define SUNOS_VEC_BIG_HOST sunos_big_vec
57 #define OASYS_VEC oasys_vec
58 #define IEEE_VEC ieee_vec
59 #define M88K_BCS_VEC m88k_bcs_vec
60 #define SREC_VEC srec_vec
61 #define M68KCOFF_VEC m68kcoff_vec
62 #endif
63 bfd_target *target_vector[] = {
64
65 #ifdef DEFAULT_VECTOR
66 &DEFAULT_VECTOR,
67 #endif /* DEFAULT_VECTOR */
68
69 #ifdef ECOFF_LITTLE_VEC
70 &ECOFF_LITTLE_VEC,
71 #endif
72
73 #ifdef ECOFF_BIG_VEC
74 &ECOFF_BIG_VEC,
75 #endif
76 #ifdef M68KCOFF_VEC
77 &M68KCOFF_VEC,
78 #endif
79 #ifdef IEEE_VEC
80 &IEEE_VEC,
81 #endif /* IEEE_VEC */
82
83 #ifdef OASYS_VEC
84 &OASYS_VEC,
85 #endif /* OASYS_VEC */
86
87 #ifdef SUNOS_VEC_BIG_HOST
88 &SUNOS_VEC_BIG_HOST,
89 #endif /* SUNOS_BIG_VEC */
90
91 #ifdef M88K_BCS_VEC
92 &M88K_BCS_VEC,
93 #endif /* M88K_BCS_VEC */
94
95 #ifdef SREC_VEC
96 &SREC_VEC,
97 #endif /* SREC_VEC */
98
99 #ifdef ICOFF_LITTLE_VEC
100 &ICOFF_LITTLE_VEC,
101 #endif /* ICOFF_LITTLE_VEC */
102
103 #ifdef ICOFF_BIG_VEC
104 &ICOFF_BIG_VEC,
105 #endif /* ICOFF_BIG_VEC */
106
107 #ifdef B_OUT_VEC_LITTLE_HOST
108 &B_OUT_VEC_LITTLE_HOST,
109 #endif /* B_OUT_VEC_LITTLE_HOST */
110
111 #ifdef B_OUT_VEC_BIG_HOST
112 &B_OUT_VEC_BIG_HOST,
113 #endif /* B_OUT_VEC_BIG_HOST */
114
115 NULL, /* end of list marker */
116 };