* aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
[deliverable/binutils-gdb.git] / bfd / nlm-target.h
1 /* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
2 Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2007 Free Software Foundation, Inc.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20
21 #define nlm_core_file_p _bfd_dummy_target
22
23 #define nlm_get_symtab_upper_bound nlmNAME (get_symtab_upper_bound)
24 #define nlm_canonicalize_symtab nlmNAME (canonicalize_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_name bfd_generic_is_local_label_name
29 #define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
30 #define nlm_get_lineno _bfd_nosymbols_get_lineno
31 #define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
32 #define nlm_find_inliner_info _bfd_nosymbols_find_inliner_info
33 #define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
34 #define nlm_read_minisymbols _bfd_generic_read_minisymbols
35 #define nlm_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
36
37 #define nlm_get_reloc_upper_bound nlmNAME (get_reloc_upper_bound)
38 #define nlm_canonicalize_reloc nlmNAME (canonicalize_reloc)
39 #define nlm_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
40 #define nlm_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
41 #define nlm_set_section_contents nlmNAME (set_section_contents)
42
43 #define nlm_sizeof_headers _bfd_nolink_sizeof_headers
44 #define nlm_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
45 #define nlm_bfd_relax_section bfd_generic_relax_section
46 #define nlm_bfd_gc_sections bfd_generic_gc_sections
47 #define nlm_bfd_merge_sections bfd_generic_merge_sections
48 #define nlm_bfd_is_group_section bfd_generic_is_group_section
49 #define nlm_bfd_discard_group bfd_generic_discard_group
50 #define nlm_section_already_linked _bfd_generic_section_already_linked
51 #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
52 #define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
53 #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
54 #define nlm_bfd_link_just_syms _bfd_generic_link_just_syms
55 #define nlm_bfd_final_link _bfd_generic_final_link
56 #define nlm_bfd_link_split_section _bfd_generic_link_split_section
57
58 /* This structure contains everything that BFD knows about a target.
59 It includes things like its byte order, name, what routines to call
60 to do various operations, etc. Every BFD points to a target structure
61 with its "xvec" member.
62
63 There are two such structures here: one for big-endian machines and
64 one for little-endian machines. */
65
66 /* Forward declaration for use when initialising alternative_target field. */
67 #ifdef TARGET_LITTLE_SYM
68 extern const bfd_target TARGET_LITTLE_SYM;
69 #endif
70
71 #ifdef TARGET_BIG_SYM
72 const bfd_target TARGET_BIG_SYM =
73 {
74 /* Name: identify kind of target. */
75 TARGET_BIG_NAME,
76
77 /* Flavour: general indication about file. */
78 bfd_target_nlm_flavour,
79
80 /* Byteorder: data is big endian. */
81 BFD_ENDIAN_BIG,
82
83 /* Header_byteorder: header is also big endian. */
84 BFD_ENDIAN_BIG,
85
86 /* Object_flags: mask of all file flags. */
87 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
88 | WP_TEXT),
89
90 /* Section_flags: mask of all section flags. */
91 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
92 | SEC_CODE | SEC_DATA),
93
94 /* Leading_symbol_char: is the first char of a user symbol
95 predictable, and if so what is it. */
96 0,
97
98 /* AR_pad_char: pad character for filenames within an archive header
99 FIXME: this really has nothing to do with NLM, this is a characteristic
100 of the archiver and/or os and should be independently tunable. */
101 '/',
102
103 /* AR_max_namelen: maximum number of characters in an archive header
104 FIXME: this really has nothing to do with NLM, this is a characteristic
105 of the archiver and should be independently tunable. This value is
106 a WAG (wild a** guess). */
107 15,
108
109 /* Routines to byte-swap various sized integers from the data sections. */
110 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
111 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
112 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
113
114 /* Routines to byte-swap various sized integers from the file headers. */
115 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
116 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
117 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
118
119 /* bfd_check_format: check the format of a file being read. */
120 { _bfd_dummy_target, /* Unknown format. */
121 nlmNAME (object_p), /* Assembler/linker output (object file). */
122 bfd_generic_archive_p, /* An archive. */
123 nlm_core_file_p /* A core file. */
124 },
125
126 /* bfd_set_format: set the format of a file being written. */
127 { bfd_false,
128 nlm_mkobject,
129 _bfd_generic_mkarchive,
130 bfd_false
131 },
132
133 /* bfd_write_contents: write cached information into a file being written. */
134 { bfd_false,
135 nlmNAME (write_object_contents),
136 _bfd_write_archive_contents,
137 bfd_false
138 },
139
140 /* Initialize a jump table with the standard macro.
141 All names start with "nlm". */
142 BFD_JUMP_TABLE_GENERIC (_bfd_generic),
143 BFD_JUMP_TABLE_COPY (_bfd_generic),
144 BFD_JUMP_TABLE_CORE (_bfd_nocore),
145 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
146 BFD_JUMP_TABLE_SYMBOLS (nlm),
147 BFD_JUMP_TABLE_RELOCS (nlm),
148 BFD_JUMP_TABLE_WRITE (nlm),
149 BFD_JUMP_TABLE_LINK (nlm),
150 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
151
152 /* Alternative endian target. */
153 #ifdef TARGET_LITTLE_SYM
154 & TARGET_LITTLE_SYM,
155 #else
156 NULL,
157 #endif
158
159 /* Backend_data. */
160 (void *) TARGET_BACKEND_DATA
161 };
162 #endif
163
164 #ifdef TARGET_LITTLE_SYM
165 const bfd_target TARGET_LITTLE_SYM =
166 {
167 /* Name: identify kind of target. */
168 TARGET_LITTLE_NAME,
169
170 /* Flavour: general indication about file. */
171 bfd_target_nlm_flavour,
172
173 /* Byteorder: data is little endian. */
174 BFD_ENDIAN_LITTLE,
175
176 /* Header_byteorder: header is also little endian. */
177 BFD_ENDIAN_LITTLE,
178
179 /* Object_flags: mask of all file flags. */
180 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
181 | WP_TEXT),
182
183 /* Section_flags: mask of all section flags. */
184 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
185 | SEC_DATA),
186
187 /* Leading_symbol_char: is the first char of a user symbol
188 predictable, and if so what is it. */
189 0,
190
191 /* AR_pad_char: pad character for filenames within an archive header
192 FIXME: this really has nothing to do with NLM, this is a characteristic
193 of the archiver and/or os and should be independently tunable. */
194 '/',
195
196 /* AR_max_namelen: maximum number of characters in an archive header
197 FIXME: this really has nothing to do with NLM, this is a characteristic
198 of the archiver and should be independently tunable. This value is
199 a WAG (wild a** guess). */
200 15,
201
202 /* Routines to byte-swap various sized integers from the data sections. */
203 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
204 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
205 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
206
207 /* Routines to byte-swap various sized integers from the file headers. */
208 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
209 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
210 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
211
212 /* bfd_check_format: check the format of a file being read. */
213 { _bfd_dummy_target, /* Unknown format. */
214 nlmNAME(object_p), /* Assembler/linker output (object file). */
215 bfd_generic_archive_p, /* An archive. */
216 nlm_core_file_p /* A core file. */
217 },
218
219 /* bfd_set_format: set the format of a file being written. */
220 { bfd_false,
221 nlm_mkobject,
222 _bfd_generic_mkarchive,
223 bfd_false
224 },
225
226 /* bfd_write_contents: write cached information into a file being written. */
227 { bfd_false,
228 nlmNAME(write_object_contents),
229 _bfd_write_archive_contents,
230 bfd_false
231 },
232
233 /* Initialize a jump table with the standard macro.
234 All names start with "nlm". */
235 BFD_JUMP_TABLE_GENERIC (_bfd_generic),
236 BFD_JUMP_TABLE_COPY (_bfd_generic),
237 BFD_JUMP_TABLE_CORE (_bfd_nocore),
238 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
239 BFD_JUMP_TABLE_SYMBOLS (nlm),
240 BFD_JUMP_TABLE_RELOCS (nlm),
241 BFD_JUMP_TABLE_WRITE (nlm),
242 BFD_JUMP_TABLE_LINK (nlm),
243 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
244
245 /* Alternative endian target. */
246 #ifdef TARGET_BIG_SYM
247 & TARGET_BIG_SYM,
248 #else
249 NULL,
250 #endif
251
252 /* Backend_data. */
253 (void *) TARGET_BACKEND_DATA
254 };
255 #endif
This page took 0.041663 seconds and 4 git commands to generate.