]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* Target definitions for NN-bit ELF |
7898deda NC |
2 | Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
3 | Free Software Foundation, Inc. | |
252b5132 RH |
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | /* This structure contains everything that BFD knows about a target. | |
22 | It includes things like its byte order, name, what routines to call | |
23 | to do various operations, etc. Every BFD points to a target structure | |
24 | with its "xvec" member. | |
25 | ||
26 | There are two such structures here: one for big-endian machines and | |
27 | one for little-endian machines. */ | |
28 | ||
29 | #define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup | |
30 | #define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info | |
31 | #ifndef bfd_elfNN_get_section_contents | |
32 | #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents | |
33 | #endif | |
34 | ||
35 | #define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab | |
36 | #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc | |
37 | #ifndef bfd_elfNN_find_nearest_line | |
38 | #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line | |
39 | #endif | |
40 | #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols | |
41 | #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol | |
42 | #define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound | |
43 | #define bfd_elfNN_get_lineno _bfd_elf_get_lineno | |
44 | #ifndef bfd_elfNN_get_reloc_upper_bound | |
45 | #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound | |
46 | #endif | |
47 | #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info | |
48 | #define bfd_elfNN_get_symtab _bfd_elf_get_symtab | |
49 | #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound | |
50 | #if 0 /* done in elf-bfd.h */ | |
51 | #define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol | |
52 | #endif | |
53 | #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol | |
54 | #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook | |
55 | #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach | |
56 | #ifndef bfd_elfNN_set_section_contents | |
57 | #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents | |
58 | #endif | |
59 | #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers | |
60 | #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents | |
61 | #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents | |
62 | ||
63 | #define bfd_elfNN_get_section_contents_in_window \ | |
64 | _bfd_generic_get_section_contents_in_window | |
65 | ||
66 | #ifndef elf_backend_got_symbol_offset | |
67 | #define elf_backend_got_symbol_offset (bfd_vma) 0 | |
68 | #endif | |
69 | #ifndef elf_backend_want_got_plt | |
70 | #define elf_backend_want_got_plt 0 | |
71 | #endif | |
72 | #ifndef elf_backend_plt_readonly | |
73 | #define elf_backend_plt_readonly 0 | |
74 | #endif | |
75 | #ifndef elf_backend_want_plt_sym | |
76 | #define elf_backend_want_plt_sym 0 | |
77 | #endif | |
78 | #ifndef elf_backend_plt_not_loaded | |
79 | #define elf_backend_plt_not_loaded 0 | |
80 | #endif | |
81 | #ifndef elf_backend_plt_alignment | |
82 | #define elf_backend_plt_alignment 2 | |
83 | #endif | |
3018b441 RH |
84 | #ifndef elf_backend_want_dynbss |
85 | #define elf_backend_want_dynbss 1 | |
86 | #endif | |
252b5132 RH |
87 | |
88 | #define bfd_elfNN_bfd_debug_info_start bfd_void | |
89 | #define bfd_elfNN_bfd_debug_info_end bfd_void | |
90 | #define bfd_elfNN_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void | |
91 | ||
92 | #ifndef bfd_elfNN_bfd_get_relocated_section_contents | |
93 | #define bfd_elfNN_bfd_get_relocated_section_contents \ | |
94 | bfd_generic_get_relocated_section_contents | |
95 | #endif | |
96 | ||
97 | #ifndef bfd_elfNN_bfd_relax_section | |
98 | #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section | |
99 | #endif | |
100 | ||
101 | #ifndef elf_backend_can_gc_sections | |
102 | #define elf_backend_can_gc_sections 0 | |
103 | #endif | |
104 | #ifndef elf_backend_gc_mark_hook | |
105 | #define elf_backend_gc_mark_hook NULL | |
106 | #endif | |
107 | #ifndef elf_backend_gc_sweep_hook | |
108 | #define elf_backend_gc_sweep_hook NULL | |
109 | #endif | |
110 | #ifndef bfd_elfNN_bfd_gc_sections | |
111 | #define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections | |
112 | #endif | |
113 | ||
8550eb6e JJ |
114 | #ifndef bfd_elfNN_bfd_merge_sections |
115 | #define bfd_elfNN_bfd_merge_sections \ | |
116 | _bfd_elf_merge_sections | |
117 | #endif | |
118 | ||
252b5132 RH |
119 | #define bfd_elfNN_bfd_make_debug_symbol \ |
120 | ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) | |
121 | ||
122 | #ifndef bfd_elfNN_bfd_copy_private_symbol_data | |
123 | #define bfd_elfNN_bfd_copy_private_symbol_data \ | |
124 | _bfd_elf_copy_private_symbol_data | |
125 | #endif | |
126 | ||
127 | #ifndef bfd_elfNN_bfd_copy_private_section_data | |
128 | #define bfd_elfNN_bfd_copy_private_section_data \ | |
129 | _bfd_elf_copy_private_section_data | |
130 | #endif | |
131 | #ifndef bfd_elfNN_bfd_copy_private_bfd_data | |
132 | #define bfd_elfNN_bfd_copy_private_bfd_data \ | |
133 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) | |
134 | #endif | |
135 | #ifndef bfd_elfNN_bfd_print_private_bfd_data | |
136 | #define bfd_elfNN_bfd_print_private_bfd_data \ | |
137 | _bfd_elf_print_private_bfd_data | |
138 | #endif | |
139 | #ifndef bfd_elfNN_bfd_merge_private_bfd_data | |
140 | #define bfd_elfNN_bfd_merge_private_bfd_data \ | |
141 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) | |
142 | #endif | |
143 | #ifndef bfd_elfNN_bfd_set_private_flags | |
144 | #define bfd_elfNN_bfd_set_private_flags \ | |
145 | ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true) | |
146 | #endif | |
147 | #ifndef bfd_elfNN_bfd_is_local_label_name | |
148 | #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name | |
149 | #endif | |
150 | ||
151 | #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound | |
152 | #define bfd_elfNN_get_dynamic_reloc_upper_bound \ | |
153 | _bfd_elf_get_dynamic_reloc_upper_bound | |
154 | #endif | |
155 | #ifndef bfd_elfNN_canonicalize_dynamic_reloc | |
156 | #define bfd_elfNN_canonicalize_dynamic_reloc \ | |
157 | _bfd_elf_canonicalize_dynamic_reloc | |
158 | #endif | |
159 | ||
160 | #ifdef elf_backend_relocate_section | |
161 | #ifndef bfd_elfNN_bfd_link_hash_table_create | |
162 | #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create | |
163 | #endif | |
164 | #else /* ! defined (elf_backend_relocate_section) */ | |
165 | /* If no backend relocate_section routine, use the generic linker. */ | |
166 | #ifndef bfd_elfNN_bfd_link_hash_table_create | |
167 | #define bfd_elfNN_bfd_link_hash_table_create \ | |
168 | _bfd_generic_link_hash_table_create | |
169 | #endif | |
170 | #ifndef bfd_elfNN_bfd_link_add_symbols | |
171 | #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols | |
172 | #endif | |
173 | #ifndef bfd_elfNN_bfd_final_link | |
174 | #define bfd_elfNN_bfd_final_link _bfd_generic_final_link | |
175 | #endif | |
176 | #endif /* ! defined (elf_backend_relocate_section) */ | |
177 | #ifndef bfd_elfNN_bfd_link_split_section | |
178 | #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section | |
179 | #endif | |
180 | ||
181 | #ifndef bfd_elfNN_archive_p | |
182 | #define bfd_elfNN_archive_p bfd_generic_archive_p | |
183 | #endif | |
184 | ||
185 | #ifndef bfd_elfNN_write_archive_contents | |
186 | #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents | |
187 | #endif | |
188 | ||
189 | #ifndef bfd_elfNN_mkobject | |
190 | #define bfd_elfNN_mkobject bfd_elf_mkobject | |
191 | #endif | |
192 | ||
193 | #ifndef bfd_elfNN_mkcorefile | |
194 | #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile | |
195 | #endif | |
196 | ||
197 | #ifndef bfd_elfNN_mkarchive | |
198 | #define bfd_elfNN_mkarchive _bfd_generic_mkarchive | |
199 | #endif | |
200 | ||
201 | #ifndef elf_symbol_leading_char | |
202 | #define elf_symbol_leading_char 0 | |
203 | #endif | |
204 | ||
205 | #ifndef elf_info_to_howto | |
206 | #define elf_info_to_howto 0 | |
207 | #endif | |
208 | ||
209 | #ifndef elf_info_to_howto_rel | |
210 | #define elf_info_to_howto_rel 0 | |
211 | #endif | |
212 | ||
213 | #ifndef ELF_MAXPAGESIZE | |
79e5982f NC |
214 | #error ELF_MAXPAGESIZE is not defined |
215 | #define ELF_MAXPAGESIZE 1 | |
252b5132 RH |
216 | #endif |
217 | ||
218 | #ifndef elf_backend_collect | |
219 | #define elf_backend_collect false | |
220 | #endif | |
221 | #ifndef elf_backend_type_change_ok | |
222 | #define elf_backend_type_change_ok false | |
223 | #endif | |
224 | ||
225 | #ifndef elf_backend_sym_is_global | |
226 | #define elf_backend_sym_is_global 0 | |
227 | #endif | |
228 | #ifndef elf_backend_object_p | |
229 | #define elf_backend_object_p 0 | |
230 | #endif | |
231 | #ifndef elf_backend_symbol_processing | |
232 | #define elf_backend_symbol_processing 0 | |
233 | #endif | |
234 | #ifndef elf_backend_symbol_table_processing | |
235 | #define elf_backend_symbol_table_processing 0 | |
236 | #endif | |
237 | #ifndef elf_backend_get_symbol_type | |
238 | #define elf_backend_get_symbol_type 0 | |
239 | #endif | |
240 | #ifndef elf_backend_section_processing | |
241 | #define elf_backend_section_processing 0 | |
242 | #endif | |
243 | #ifndef elf_backend_section_from_shdr | |
244 | #define elf_backend_section_from_shdr 0 | |
245 | #endif | |
fa152c49 JW |
246 | #ifndef elf_backend_section_flags |
247 | #define elf_backend_section_flags 0 | |
248 | #endif | |
20cfcaae NC |
249 | #ifndef elf_backend_section_from_phdr |
250 | #define elf_backend_section_from_phdr 0 | |
251 | #endif | |
252b5132 RH |
252 | #ifndef elf_backend_fake_sections |
253 | #define elf_backend_fake_sections 0 | |
254 | #endif | |
255 | #ifndef elf_backend_section_from_bfd_section | |
256 | #define elf_backend_section_from_bfd_section 0 | |
257 | #endif | |
258 | #ifndef elf_backend_add_symbol_hook | |
259 | #define elf_backend_add_symbol_hook 0 | |
260 | #endif | |
261 | #ifndef elf_backend_link_output_symbol_hook | |
262 | #define elf_backend_link_output_symbol_hook 0 | |
263 | #endif | |
264 | #ifndef elf_backend_create_dynamic_sections | |
265 | #define elf_backend_create_dynamic_sections 0 | |
266 | #endif | |
267 | #ifndef elf_backend_check_relocs | |
268 | #define elf_backend_check_relocs 0 | |
269 | #endif | |
270 | #ifndef elf_backend_adjust_dynamic_symbol | |
271 | #define elf_backend_adjust_dynamic_symbol 0 | |
272 | #endif | |
273 | #ifndef elf_backend_always_size_sections | |
274 | #define elf_backend_always_size_sections 0 | |
275 | #endif | |
276 | #ifndef elf_backend_size_dynamic_sections | |
277 | #define elf_backend_size_dynamic_sections 0 | |
278 | #endif | |
279 | #ifndef elf_backend_relocate_section | |
280 | #define elf_backend_relocate_section 0 | |
281 | #endif | |
282 | #ifndef elf_backend_finish_dynamic_symbol | |
283 | #define elf_backend_finish_dynamic_symbol 0 | |
284 | #endif | |
285 | #ifndef elf_backend_finish_dynamic_sections | |
286 | #define elf_backend_finish_dynamic_sections 0 | |
287 | #endif | |
288 | #ifndef elf_backend_begin_write_processing | |
289 | #define elf_backend_begin_write_processing 0 | |
290 | #endif | |
291 | #ifndef elf_backend_final_write_processing | |
292 | #define elf_backend_final_write_processing 0 | |
293 | #endif | |
294 | #ifndef elf_backend_additional_program_headers | |
295 | #define elf_backend_additional_program_headers 0 | |
296 | #endif | |
297 | #ifndef elf_backend_modify_segment_map | |
298 | #define elf_backend_modify_segment_map 0 | |
299 | #endif | |
300 | #ifndef elf_backend_ecoff_debug_swap | |
301 | #define elf_backend_ecoff_debug_swap 0 | |
302 | #endif | |
303 | #ifndef elf_backend_got_header_size | |
304 | #define elf_backend_got_header_size 0 | |
305 | #endif | |
306 | #ifndef elf_backend_plt_header_size | |
307 | #define elf_backend_plt_header_size 0 | |
308 | #endif | |
e6c51ed4 NC |
309 | #ifndef elf_backend_post_process_headers |
310 | #define elf_backend_post_process_headers NULL | |
311 | #endif | |
587ff49e RH |
312 | #ifndef elf_backend_print_symbol_all |
313 | #define elf_backend_print_symbol_all NULL | |
314 | #endif | |
315 | #ifndef elf_backend_output_arch_syms | |
316 | #define elf_backend_output_arch_syms NULL | |
317 | #endif | |
c61b8717 RH |
318 | #ifndef elf_backend_copy_indirect_symbol |
319 | #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect | |
320 | #endif | |
321 | #ifndef elf_backend_hide_symbol | |
322 | #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol | |
323 | #endif | |
324 | ||
bf572ba0 MM |
325 | /* Previously, backends could only use SHT_REL or SHT_RELA relocation |
326 | sections, but not both. They defined USE_REL to indicate SHT_REL | |
327 | sections, and left it undefined to indicated SHT_RELA sections. | |
328 | For backwards compatibility, we still support this usage. */ | |
329 | #ifndef USE_REL | |
330 | #define USE_REL 0 | |
331 | #else | |
332 | #undef USE_REL | |
333 | #define USE_REL 1 | |
3e932841 | 334 | #endif |
bf572ba0 MM |
335 | |
336 | /* Use these in new code. */ | |
3e932841 | 337 | #ifndef elf_backend_may_use_rel_p |
bf572ba0 | 338 | #define elf_backend_may_use_rel_p USE_REL |
3e932841 | 339 | #endif |
bf572ba0 MM |
340 | #ifndef elf_backend_may_use_rela_p |
341 | #define elf_backend_may_use_rela_p !USE_REL | |
342 | #endif | |
3e932841 | 343 | #ifndef elf_backend_default_use_rela_p |
bf572ba0 MM |
344 | #define elf_backend_default_use_rela_p !USE_REL |
345 | #endif | |
346 | ||
252b5132 RH |
347 | #ifndef ELF_MACHINE_ALT1 |
348 | #define ELF_MACHINE_ALT1 0 | |
349 | #endif | |
350 | ||
351 | #ifndef ELF_MACHINE_ALT2 | |
352 | #define ELF_MACHINE_ALT2 0 | |
353 | #endif | |
354 | ||
355 | #ifndef elf_backend_size_info | |
356 | #define elf_backend_size_info _bfd_elfNN_size_info | |
357 | #endif | |
358 | ||
86dc0f79 RH |
359 | #ifndef elf_backend_sign_extend_vma |
360 | #define elf_backend_sign_extend_vma 0 | |
361 | #endif | |
362 | ||
252b5132 RH |
363 | extern const struct elf_size_info _bfd_elfNN_size_info; |
364 | ||
dd745cfa | 365 | #ifndef INCLUDED_TARGET_FILE |
252b5132 RH |
366 | static CONST struct elf_backend_data elfNN_bed = |
367 | { | |
252b5132 RH |
368 | ELF_ARCH, /* arch */ |
369 | ELF_MACHINE_CODE, /* elf_machine_code */ | |
370 | ELF_MAXPAGESIZE, /* maxpagesize */ | |
252b5132 RH |
371 | elf_info_to_howto, |
372 | elf_info_to_howto_rel, | |
373 | elf_backend_sym_is_global, | |
374 | elf_backend_object_p, | |
375 | elf_backend_symbol_processing, | |
376 | elf_backend_symbol_table_processing, | |
377 | elf_backend_get_symbol_type, | |
378 | elf_backend_section_processing, | |
379 | elf_backend_section_from_shdr, | |
fa152c49 | 380 | elf_backend_section_flags, |
20cfcaae | 381 | elf_backend_section_from_phdr, |
252b5132 RH |
382 | elf_backend_fake_sections, |
383 | elf_backend_section_from_bfd_section, | |
384 | elf_backend_add_symbol_hook, | |
385 | elf_backend_link_output_symbol_hook, | |
386 | elf_backend_create_dynamic_sections, | |
387 | elf_backend_check_relocs, | |
388 | elf_backend_adjust_dynamic_symbol, | |
389 | elf_backend_always_size_sections, | |
390 | elf_backend_size_dynamic_sections, | |
391 | elf_backend_relocate_section, | |
392 | elf_backend_finish_dynamic_symbol, | |
393 | elf_backend_finish_dynamic_sections, | |
394 | elf_backend_begin_write_processing, | |
395 | elf_backend_final_write_processing, | |
396 | elf_backend_additional_program_headers, | |
397 | elf_backend_modify_segment_map, | |
398 | elf_backend_gc_mark_hook, | |
399 | elf_backend_gc_sweep_hook, | |
e6c51ed4 | 400 | elf_backend_post_process_headers, |
587ff49e RH |
401 | elf_backend_print_symbol_all, |
402 | elf_backend_output_arch_syms, | |
c61b8717 RH |
403 | elf_backend_copy_indirect_symbol, |
404 | elf_backend_hide_symbol, | |
252b5132 RH |
405 | elf_backend_ecoff_debug_swap, |
406 | ELF_MACHINE_ALT1, | |
407 | ELF_MACHINE_ALT2, | |
408 | &elf_backend_size_info, | |
409 | elf_backend_got_symbol_offset, | |
410 | elf_backend_got_header_size, | |
411 | elf_backend_plt_header_size, | |
86dc0f79 RH |
412 | elf_backend_collect, |
413 | elf_backend_type_change_ok, | |
bf572ba0 MM |
414 | elf_backend_may_use_rel_p, |
415 | elf_backend_may_use_rela_p, | |
416 | elf_backend_default_use_rela_p, | |
86dc0f79 | 417 | elf_backend_sign_extend_vma, |
252b5132 RH |
418 | elf_backend_want_got_plt, |
419 | elf_backend_plt_readonly, | |
420 | elf_backend_want_plt_sym, | |
421 | elf_backend_plt_not_loaded, | |
422 | elf_backend_plt_alignment, | |
2ac8ce5f RH |
423 | elf_backend_can_gc_sections, |
424 | elf_backend_want_dynbss | |
252b5132 | 425 | }; |
dd745cfa | 426 | #endif |
252b5132 | 427 | |
c3c89269 NC |
428 | /* Forward declaration for use when initialising alternative_target field. */ |
429 | #ifdef TARGET_LITTLE_SYM | |
430 | extern const bfd_target TARGET_LITTLE_SYM; | |
431 | #endif | |
432 | ||
252b5132 RH |
433 | #ifdef TARGET_BIG_SYM |
434 | const bfd_target TARGET_BIG_SYM = | |
435 | { | |
436 | /* name: identify kind of target */ | |
437 | TARGET_BIG_NAME, | |
438 | ||
439 | /* flavour: general indication about file */ | |
440 | bfd_target_elf_flavour, | |
441 | ||
442 | /* byteorder: data is big endian */ | |
443 | BFD_ENDIAN_BIG, | |
444 | ||
445 | /* header_byteorder: header is also big endian */ | |
446 | BFD_ENDIAN_BIG, | |
447 | ||
448 | /* object_flags: mask of all file flags */ | |
449 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | | |
450 | DYNAMIC | WP_TEXT | D_PAGED), | |
451 | ||
452 | /* section_flags: mask of all section flags */ | |
453 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
454 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES), | |
455 | ||
456 | /* leading_symbol_char: is the first char of a user symbol | |
457 | predictable, and if so what is it */ | |
458 | elf_symbol_leading_char, | |
459 | ||
460 | /* ar_pad_char: pad character for filenames within an archive header | |
461 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
462 | of the archiver and/or os and should be independently tunable */ | |
463 | '/', | |
464 | ||
465 | /* ar_max_namelen: maximum number of characters in an archive header | |
466 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
467 | of the archiver and should be independently tunable. This value is | |
468 | a WAG (wild a** guess) */ | |
469 | 14, | |
470 | ||
471 | /* Routines to byte-swap various sized integers from the data sections */ | |
472 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
473 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
474 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
475 | ||
476 | /* Routines to byte-swap various sized integers from the file headers */ | |
477 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
478 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
479 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
480 | ||
481 | /* bfd_check_format: check the format of a file being read */ | |
482 | { _bfd_dummy_target, /* unknown format */ | |
483 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
484 | bfd_elfNN_archive_p, /* an archive */ | |
485 | bfd_elfNN_core_file_p /* a core file */ | |
486 | }, | |
487 | ||
488 | /* bfd_set_format: set the format of a file being written */ | |
489 | { bfd_false, | |
490 | bfd_elfNN_mkobject, | |
491 | bfd_elfNN_mkarchive, | |
492 | bfd_elfNN_mkcorefile | |
493 | }, | |
494 | ||
495 | /* bfd_write_contents: write cached information into a file being written */ | |
496 | { bfd_false, | |
497 | bfd_elfNN_write_object_contents, | |
498 | bfd_elfNN_write_archive_contents, | |
499 | bfd_elfNN_write_corefile_contents, | |
500 | }, | |
501 | ||
502 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), | |
503 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
504 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
505 | #ifdef bfd_elfNN_archive_functions | |
506 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
507 | #else | |
508 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), | |
509 | #endif | |
510 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), | |
511 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
512 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
513 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
514 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
515 | ||
c3c89269 NC |
516 | /* Alternative endian target. */ |
517 | #ifdef TARGET_LITTLE_SYM | |
518 | & TARGET_LITTLE_SYM, | |
519 | #else | |
520 | NULL, | |
521 | #endif | |
522 | ||
252b5132 | 523 | /* backend_data: */ |
c3c89269 | 524 | (PTR) &elfNN_bed |
252b5132 RH |
525 | }; |
526 | #endif | |
527 | ||
528 | #ifdef TARGET_LITTLE_SYM | |
529 | const bfd_target TARGET_LITTLE_SYM = | |
530 | { | |
531 | /* name: identify kind of target */ | |
532 | TARGET_LITTLE_NAME, | |
533 | ||
534 | /* flavour: general indication about file */ | |
535 | bfd_target_elf_flavour, | |
536 | ||
537 | /* byteorder: data is little endian */ | |
538 | BFD_ENDIAN_LITTLE, | |
539 | ||
540 | /* header_byteorder: header is also little endian */ | |
541 | BFD_ENDIAN_LITTLE, | |
542 | ||
543 | /* object_flags: mask of all file flags */ | |
544 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | | |
545 | DYNAMIC | WP_TEXT | D_PAGED), | |
546 | ||
547 | /* section_flags: mask of all section flags */ | |
548 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | | |
549 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES), | |
550 | ||
551 | /* leading_symbol_char: is the first char of a user symbol | |
552 | predictable, and if so what is it */ | |
553 | elf_symbol_leading_char, | |
554 | ||
555 | /* ar_pad_char: pad character for filenames within an archive header | |
556 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
557 | of the archiver and/or os and should be independently tunable */ | |
558 | '/', | |
559 | ||
560 | /* ar_max_namelen: maximum number of characters in an archive header | |
561 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
562 | of the archiver and should be independently tunable. This value is | |
563 | a WAG (wild a** guess) */ | |
564 | 14, | |
565 | ||
566 | /* Routines to byte-swap various sized integers from the data sections */ | |
567 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
568 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
569 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
570 | ||
571 | /* Routines to byte-swap various sized integers from the file headers */ | |
572 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
573 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
574 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
575 | ||
576 | /* bfd_check_format: check the format of a file being read */ | |
577 | { _bfd_dummy_target, /* unknown format */ | |
578 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
579 | bfd_elfNN_archive_p, /* an archive */ | |
580 | bfd_elfNN_core_file_p /* a core file */ | |
581 | }, | |
582 | ||
583 | /* bfd_set_format: set the format of a file being written */ | |
584 | { bfd_false, | |
585 | bfd_elfNN_mkobject, | |
586 | bfd_elfNN_mkarchive, | |
587 | bfd_elfNN_mkcorefile | |
588 | }, | |
589 | ||
590 | /* bfd_write_contents: write cached information into a file being written */ | |
591 | { bfd_false, | |
592 | bfd_elfNN_write_object_contents, | |
593 | bfd_elfNN_write_archive_contents, | |
594 | bfd_elfNN_write_corefile_contents, | |
595 | }, | |
596 | ||
597 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), | |
598 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
599 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
600 | #ifdef bfd_elfNN_archive_functions | |
601 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
602 | #else | |
603 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), | |
604 | #endif | |
605 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), | |
606 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
607 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
608 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
609 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
610 | ||
c3c89269 NC |
611 | /* Alternative endian target. */ |
612 | #ifdef TARGET_BIG_SYM | |
613 | & TARGET_BIG_SYM, | |
614 | #else | |
615 | NULL, | |
616 | #endif | |
3e932841 | 617 | |
252b5132 | 618 | /* backend_data: */ |
c3c89269 | 619 | (PTR) &elfNN_bed |
252b5132 RH |
620 | }; |
621 | #endif |