]>
Commit | Line | Data |
---|---|---|
d1f83f44 | 1 | /* Target definitions for 32/64-bit NLM (NetWare Loadable Module) |
dfc1c006 | 2 | Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
c3e964b9 FF |
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 | ||
9deaaaf1 ILT |
20 | #define nlm_core_file_p \ |
21 | ((bfd_target *(*) PARAMS ((bfd *))) bfd_nullvoidptr) | |
22 | ||
6812b607 ILT |
23 | #define nlm_get_symtab_upper_bound nlmNAME(get_symtab_upper_bound) |
24 | #define nlm_get_symtab nlmNAME(get_symtab) | |
25 | #define nlm_make_empty_symbol nlmNAME(make_empty_symbol) | |
26 | #define nlm_print_symbol nlmNAME(print_symbol) | |
27 | #define nlm_get_symbol_info nlmNAME(get_symbol_info) | |
28 | #define nlm_bfd_is_local_label bfd_generic_is_local_label | |
29 | #define nlm_get_lineno _bfd_nosymbols_get_lineno | |
30 | #define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line | |
31 | #define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol | |
32 | ||
33 | #define nlm_get_reloc_upper_bound nlmNAME(get_reloc_upper_bound) | |
34 | #define nlm_canonicalize_reloc nlmNAME(canonicalize_reloc) | |
35 | #define nlm_bfd_reloc_type_lookup bfd_default_reloc_type_lookup | |
36 | ||
37 | #define nlm_set_section_contents nlmNAME(set_section_contents) | |
38 | ||
39 | #define nlm_sizeof_headers _bfd_nolink_sizeof_headers | |
9deaaaf1 | 40 | #define nlm_bfd_get_relocated_section_contents \ |
6812b607 ILT |
41 | bfd_generic_get_relocated_section_contents |
42 | #define nlm_bfd_relax_section bfd_generic_relax_section | |
9deaaaf1 ILT |
43 | #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create |
44 | #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols | |
45 | #define nlm_bfd_final_link _bfd_generic_final_link | |
46 | ||
c3e964b9 FF |
47 | /* This structure contains everything that BFD knows about a target. |
48 | It includes things like its byte order, name, what routines to call | |
49 | to do various operations, etc. Every BFD points to a target structure | |
50 | with its "xvec" member. | |
51 | ||
52 | There are two such structures here: one for big-endian machines and | |
53 | one for little-endian machines. */ | |
54 | ||
c3e964b9 FF |
55 | |
56 | #ifdef TARGET_BIG_SYM | |
57 | bfd_target TARGET_BIG_SYM = | |
58 | { | |
59 | /* name: identify kind of target */ | |
60 | TARGET_BIG_NAME, | |
61 | ||
62 | /* flavour: general indication about file */ | |
63 | bfd_target_nlm_flavour, | |
64 | ||
65 | /* byteorder_big_p: data is big endian */ | |
66 | true, | |
67 | ||
68 | /* header_byteorder_big_p: header is also big endian */ | |
69 | true, | |
70 | ||
71 | /* object_flags: mask of all file flags */ | |
9deaaaf1 ILT |
72 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
73 | | WP_TEXT), | |
c3e964b9 FF |
74 | |
75 | /* section_flags: mask of all section flags */ | |
76 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
77 | SEC_CODE | SEC_DATA), | |
78 | ||
79 | /* leading_symbol_char: is the first char of a user symbol | |
80 | predictable, and if so what is it */ | |
81 | 0, | |
82 | ||
83 | /* ar_pad_char: pad character for filenames within an archive header | |
84 | FIXME: this really has nothing to do with NLM, this is a characteristic | |
85 | of the archiver and/or os and should be independently tunable */ | |
86 | '/', | |
87 | ||
88 | /* ar_max_namelen: maximum number of characters in an archive header | |
89 | FIXME: this really has nothing to do with NLM, this is a characteristic | |
90 | of the archiver and should be independently tunable. This value is | |
91 | a WAG (wild a** guess) */ | |
92 | 15, | |
93 | ||
94 | /* align_power_min: minimum alignment restriction for any section | |
95 | FIXME: this value may be target machine dependent */ | |
96 | 3, | |
97 | ||
98 | /* Routines to byte-swap various sized integers from the data sections */ | |
9deaaaf1 ILT |
99 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
100 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
101 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
c3e964b9 FF |
102 | |
103 | /* Routines to byte-swap various sized integers from the file headers */ | |
9deaaaf1 ILT |
104 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, |
105 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
106 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
c3e964b9 FF |
107 | |
108 | /* bfd_check_format: check the format of a file being read */ | |
109 | { _bfd_dummy_target, /* unknown format */ | |
d1f83f44 | 110 | nlmNAME(object_p), /* assembler/linker output (object file) */ |
c3e964b9 | 111 | bfd_generic_archive_p, /* an archive */ |
9deaaaf1 | 112 | nlm_core_file_p /* a core file */ |
c3e964b9 FF |
113 | }, |
114 | ||
115 | /* bfd_set_format: set the format of a file being written */ | |
116 | { bfd_false, | |
d1f83f44 | 117 | nlm_mkobject, |
c3e964b9 FF |
118 | _bfd_generic_mkarchive, |
119 | bfd_false | |
120 | }, | |
121 | ||
122 | /* bfd_write_contents: write cached information into a file being written */ | |
123 | { bfd_false, | |
d1f83f44 | 124 | nlmNAME(write_object_contents), |
c3e964b9 FF |
125 | _bfd_write_archive_contents, |
126 | bfd_false | |
127 | }, | |
128 | ||
129 | /* Initialize a jump table with the standard macro. All names start with | |
130 | "nlm" */ | |
6812b607 ILT |
131 | BFD_JUMP_TABLE_GENERIC (_bfd_generic), |
132 | BFD_JUMP_TABLE_COPY (_bfd_generic), | |
133 | BFD_JUMP_TABLE_CORE (_bfd_nocore), | |
134 | BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), | |
135 | BFD_JUMP_TABLE_SYMBOLS (nlm), | |
136 | BFD_JUMP_TABLE_RELOCS (nlm), | |
137 | BFD_JUMP_TABLE_WRITE (nlm), | |
138 | BFD_JUMP_TABLE_LINK (nlm), | |
dfc1c006 | 139 | BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), |
c3e964b9 FF |
140 | |
141 | /* backend_data: */ | |
9deaaaf1 | 142 | (PTR) TARGET_BACKEND_DATA |
c3e964b9 FF |
143 | }; |
144 | #endif | |
145 | ||
146 | #ifdef TARGET_LITTLE_SYM | |
147 | bfd_target TARGET_LITTLE_SYM = | |
148 | { | |
149 | /* name: identify kind of target */ | |
150 | TARGET_LITTLE_NAME, | |
151 | ||
152 | /* flavour: general indication about file */ | |
153 | bfd_target_nlm_flavour, | |
154 | ||
155 | /* byteorder_big_p: data is big endian */ | |
156 | false, /* Nope -- this one's little endian */ | |
157 | ||
158 | /* header_byteorder_big_p: header is also big endian */ | |
159 | false, /* Nope -- this one's little endian */ | |
160 | ||
161 | /* object_flags: mask of all file flags */ | |
9deaaaf1 ILT |
162 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
163 | | WP_TEXT), | |
c3e964b9 FF |
164 | |
165 | /* section_flags: mask of all section flags */ | |
166 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
167 | SEC_DATA), | |
168 | ||
169 | /* leading_symbol_char: is the first char of a user symbol | |
170 | predictable, and if so what is it */ | |
171 | 0, | |
172 | ||
173 | /* ar_pad_char: pad character for filenames within an archive header | |
174 | FIXME: this really has nothing to do with NLM, this is a characteristic | |
175 | of the archiver and/or os and should be independently tunable */ | |
176 | '/', | |
177 | ||
178 | /* ar_max_namelen: maximum number of characters in an archive header | |
179 | FIXME: this really has nothing to do with NLM, this is a characteristic | |
180 | of the archiver and should be independently tunable. This value is | |
181 | a WAG (wild a** guess) */ | |
182 | 15, | |
183 | ||
184 | /* align_power_min: minimum alignment restriction for any section | |
185 | FIXME: this value may be target machine dependent */ | |
186 | 3, | |
187 | ||
188 | /* Routines to byte-swap various sized integers from the data sections */ | |
9deaaaf1 ILT |
189 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
190 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
191 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
c3e964b9 FF |
192 | |
193 | /* Routines to byte-swap various sized integers from the file headers */ | |
9deaaaf1 ILT |
194 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, |
195 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
196 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
c3e964b9 FF |
197 | |
198 | /* bfd_check_format: check the format of a file being read */ | |
199 | { _bfd_dummy_target, /* unknown format */ | |
d1f83f44 | 200 | nlmNAME(object_p), /* assembler/linker output (object file) */ |
c3e964b9 | 201 | bfd_generic_archive_p, /* an archive */ |
9deaaaf1 | 202 | nlm_core_file_p /* a core file */ |
c3e964b9 FF |
203 | }, |
204 | ||
205 | /* bfd_set_format: set the format of a file being written */ | |
206 | { bfd_false, | |
d1f83f44 | 207 | nlm_mkobject, |
c3e964b9 FF |
208 | _bfd_generic_mkarchive, |
209 | bfd_false | |
210 | }, | |
211 | ||
212 | /* bfd_write_contents: write cached information into a file being written */ | |
213 | { bfd_false, | |
d1f83f44 | 214 | nlmNAME(write_object_contents), |
c3e964b9 FF |
215 | _bfd_write_archive_contents, |
216 | bfd_false | |
217 | }, | |
218 | ||
219 | /* Initialize a jump table with the standard macro. All names start with | |
220 | "nlm" */ | |
6812b607 ILT |
221 | BFD_JUMP_TABLE_GENERIC (_bfd_generic), |
222 | BFD_JUMP_TABLE_COPY (_bfd_generic), | |
223 | BFD_JUMP_TABLE_CORE (_bfd_nocore), | |
224 | BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), | |
225 | BFD_JUMP_TABLE_SYMBOLS (nlm), | |
226 | BFD_JUMP_TABLE_RELOCS (nlm), | |
227 | BFD_JUMP_TABLE_WRITE (nlm), | |
228 | BFD_JUMP_TABLE_LINK (nlm), | |
dfc1c006 | 229 | BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), |
c3e964b9 FF |
230 | |
231 | /* backend_data: */ | |
9deaaaf1 | 232 | (PTR) TARGET_BACKEND_DATA |
c3e964b9 FF |
233 | }; |
234 | #endif |