* configure.in (*-*-netware, i[34]86-*-netware): New configs.
[binutils-gdb.git] / bfd / nlm64-target.h
1 /* Target definitions for 64-bit NLM (NetWare Loadable Module)
2 Copyright (C) 1993 Free Software Foundation, Inc.
3
4 This file is part of BFD, the Binary File Descriptor library.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20 /* This structure contains everything that BFD knows about a target.
21 It includes things like its byte order, name, what routines to call
22 to do various operations, etc. Every BFD points to a target structure
23 with its "xvec" member.
24
25 There are two such structures here: one for big-endian machines and
26 one for little-endian machines. */
27
28 /* We don't have core files. */
29
30 #define bfd_nlm64_core_file_p \
31 ((bfd_target *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
32 #define bfd_nlm64_core_file_failing_command \
33 _bfd_dummy_core_file_failing_command
34 #define bfd_nlm64_core_file_failing_signal \
35 _bfd_dummy_core_file_failing_signal
36 #define bfd_nlm64_core_file_matches_executable_p \
37 _bfd_dummy_core_file_matches_executable_p
38
39 /* Archives are generic or unimplemented. */
40
41 #define bfd_nlm64_slurp_armap \
42 bfd_slurp_coff_armap
43 #define bfd_nlm64_slurp_extended_name_table \
44 _bfd_slurp_extended_name_table
45 #define bfd_nlm64_truncate_arname \
46 bfd_dont_truncate_arname
47 #define bfd_nlm64_openr_next_archived_file \
48 bfd_generic_openr_next_archived_file
49 #define bfd_nlm64_generic_stat_arch_elt \
50 bfd_generic_stat_arch_elt
51 #define bfd_nlm64_write_armap \
52 coff_write_armap
53
54 /* Ordinary section reading and writing */
55 #define bfd_nlm64_get_section_contents \
56 bfd_generic_get_section_contents
57 #define bfd_nlm64_close_and_cleanup \
58 bfd_generic_close_and_cleanup
59
60 #define bfd_nlm64_bfd_debug_info_start \
61 bfd_void
62 #define bfd_nlm64_bfd_debug_info_end \
63 bfd_void
64 #define bfd_nlm64_bfd_debug_info_accumulate \
65 (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
66 #define bfd_nlm64_bfd_get_relocated_section_contents \
67 bfd_generic_get_relocated_section_contents
68 #define bfd_nlm64_bfd_relax_section \
69 bfd_generic_relax_section
70 #define bfd_nlm64_bfd_seclet_link \
71 bfd_generic_seclet_link
72 #define bfd_nlm64_bfd_make_debug_symbol \
73 ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
74
75 #define bfd_nlm64_set_section_contents \
76 bfd_generic_set_section_contents
77 #define bfd_nlm64_new_section_hook \
78 _bfd_dummy_new_section_hook
79
80 #define bfd_nlm64_get_reloc_upper_bound \
81 ((unsigned int (*) PARAMS ((bfd *, sec_ptr))) bfd_0u)
82
83 #define bfd_nlm64_canonicalize_reloc \
84 ((unsigned int (*) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **))) bfd_0u)
85
86 #define bfd_nlm64_print_symbol \
87 ((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_false)
88
89 #define bfd_nlm64_get_lineno \
90 ((alent * (*) PARAMS ((bfd *, asymbol *))) bfd_false)
91
92 #define bfd_nlm64_find_nearest_line \
93 ((boolean (*) PARAMS ((bfd *, asection *, asymbol **, bfd_vma, \
94 CONST char **, CONST char **, unsigned int *))) \
95 bfd_false)
96
97 #define bfd_nlm64_sizeof_headers \
98 ((int (*) PARAMS ((bfd *, boolean))) bfd_0u)
99
100 #define bfd_nlm64_write_object_contents \
101 ((boolean (*) PARAMS ((bfd *))) bfd_false)
102
103 #ifdef TARGET_BIG_SYM
104 bfd_target TARGET_BIG_SYM =
105 {
106 /* name: identify kind of target */
107 TARGET_BIG_NAME,
108
109 /* flavour: general indication about file */
110 bfd_target_nlm_flavour,
111
112 /* byteorder_big_p: data is big endian */
113 true,
114
115 /* header_byteorder_big_p: header is also big endian */
116 true,
117
118 /* object_flags: mask of all file flags */
119 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
120 DYNAMIC | WP_TEXT),
121
122 /* section_flags: mask of all section flags */
123 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
124 SEC_CODE | SEC_DATA),
125
126 /* leading_symbol_char: is the first char of a user symbol
127 predictable, and if so what is it */
128 0,
129
130 /* ar_pad_char: pad character for filenames within an archive header
131 FIXME: this really has nothing to do with NLM, this is a characteristic
132 of the archiver and/or os and should be independently tunable */
133 '/',
134
135 /* ar_max_namelen: maximum number of characters in an archive header
136 FIXME: this really has nothing to do with NLM, this is a characteristic
137 of the archiver and should be independently tunable. This value is
138 a WAG (wild a** guess) */
139 15,
140
141 /* align_power_min: minimum alignment restriction for any section
142 FIXME: this value may be target machine dependent */
143 3,
144
145 /* Routines to byte-swap various sized integers from the data sections */
146 _do_getb64, _do_getb_signed_64, _do_putb64,
147 _do_getb32, _do_getb_signed_32, _do_putb32,
148 _do_getb16, _do_getb_signed_16, _do_putb16,
149
150 /* Routines to byte-swap various sized integers from the file headers */
151 _do_getb64, _do_getb_signed_64, _do_putb64,
152 _do_getb32, _do_getb_signed_32, _do_putb32,
153 _do_getb16, _do_getb_signed_16, _do_putb16,
154
155 /* bfd_check_format: check the format of a file being read */
156 { _bfd_dummy_target, /* unknown format */
157 bfd_nlm64_object_p, /* assembler/linker output (object file) */
158 bfd_generic_archive_p, /* an archive */
159 bfd_nlm64_core_file_p /* a core file */
160 },
161
162 /* bfd_set_format: set the format of a file being written */
163 { bfd_false,
164 bfd_nlm_mkobject,
165 _bfd_generic_mkarchive,
166 bfd_false
167 },
168
169 /* bfd_write_contents: write cached information into a file being written */
170 { bfd_false,
171 bfd_nlm64_write_object_contents,
172 _bfd_write_archive_contents,
173 bfd_false
174 },
175
176 /* Initialize a jump table with the standard macro. All names start with
177 "nlm" */
178 JUMP_TABLE(bfd_nlm64),
179
180 /* backend_data: */
181 (PTR) NULL,
182 };
183 #endif
184
185 #ifdef TARGET_LITTLE_SYM
186 bfd_target TARGET_LITTLE_SYM =
187 {
188 /* name: identify kind of target */
189 TARGET_LITTLE_NAME,
190
191 /* flavour: general indication about file */
192 bfd_target_nlm_flavour,
193
194 /* byteorder_big_p: data is big endian */
195 false, /* Nope -- this one's little endian */
196
197 /* header_byteorder_big_p: header is also big endian */
198 false, /* Nope -- this one's little endian */
199
200 /* object_flags: mask of all file flags */
201 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
202 DYNAMIC | WP_TEXT),
203
204 /* section_flags: mask of all section flags */
205 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
206 SEC_DATA),
207
208 /* leading_symbol_char: is the first char of a user symbol
209 predictable, and if so what is it */
210 0,
211
212 /* ar_pad_char: pad character for filenames within an archive header
213 FIXME: this really has nothing to do with NLM, this is a characteristic
214 of the archiver and/or os and should be independently tunable */
215 '/',
216
217 /* ar_max_namelen: maximum number of characters in an archive header
218 FIXME: this really has nothing to do with NLM, this is a characteristic
219 of the archiver and should be independently tunable. This value is
220 a WAG (wild a** guess) */
221 15,
222
223 /* align_power_min: minimum alignment restriction for any section
224 FIXME: this value may be target machine dependent */
225 3,
226
227 /* Routines to byte-swap various sized integers from the data sections */
228 _do_getl64, _do_getl_signed_64, _do_putl64,
229 _do_getl32, _do_getl_signed_32, _do_putl32,
230 _do_getl16, _do_getl_signed_16, _do_putl16,
231
232 /* Routines to byte-swap various sized integers from the file headers */
233 _do_getl64, _do_getl_signed_64, _do_putl64,
234 _do_getl32, _do_getl_signed_32, _do_putl32,
235 _do_getl16, _do_getl_signed_16, _do_putl16,
236
237 /* bfd_check_format: check the format of a file being read */
238 { _bfd_dummy_target, /* unknown format */
239 bfd_nlm64_object_p, /* assembler/linker output (object file) */
240 bfd_generic_archive_p, /* an archive */
241 bfd_nlm64_core_file_p /* a core file */
242 },
243
244 /* bfd_set_format: set the format of a file being written */
245 { bfd_false,
246 bfd_nlm_mkobject,
247 _bfd_generic_mkarchive,
248 bfd_false
249 },
250
251 /* bfd_write_contents: write cached information into a file being written */
252 { bfd_false,
253 bfd_nlm64_write_object_contents,
254 _bfd_write_archive_contents,
255 bfd_false
256 },
257
258 /* Initialize a jump table with the standard macro. All names start with
259 "nlm" */
260 JUMP_TABLE(bfd_nlm64),
261
262 /* backend_data: */
263 (PTR) NULL,
264 };
265 #endif