]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/elfxx-target.h
* Makefile.am: Add elfxx-mips.c to the known backends.
[thirdparty/binutils-gdb.git] / bfd / elfxx-target.h
1 /* Target definitions for NN-bit ELF
2 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
3 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., 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_can_refcount
70 #define elf_backend_can_refcount 0
71 #endif
72 #ifndef elf_backend_want_got_plt
73 #define elf_backend_want_got_plt 0
74 #endif
75 #ifndef elf_backend_plt_readonly
76 #define elf_backend_plt_readonly 0
77 #endif
78 #ifndef elf_backend_want_plt_sym
79 #define elf_backend_want_plt_sym 0
80 #endif
81 #ifndef elf_backend_plt_not_loaded
82 #define elf_backend_plt_not_loaded 0
83 #endif
84 #ifndef elf_backend_plt_alignment
85 #define elf_backend_plt_alignment 2
86 #endif
87 #ifndef elf_backend_want_dynbss
88 #define elf_backend_want_dynbss 1
89 #endif
90
91 #define bfd_elfNN_bfd_debug_info_start bfd_void
92 #define bfd_elfNN_bfd_debug_info_end bfd_void
93 #define bfd_elfNN_bfd_debug_info_accumulate \
94 (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
95
96 #ifndef bfd_elfNN_bfd_get_relocated_section_contents
97 #define bfd_elfNN_bfd_get_relocated_section_contents \
98 bfd_generic_get_relocated_section_contents
99 #endif
100
101 #ifndef bfd_elfNN_bfd_relax_section
102 #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section
103 #endif
104
105 #ifndef elf_backend_can_gc_sections
106 #define elf_backend_can_gc_sections 0
107 #endif
108 #ifndef elf_backend_can_refcount
109 #define elf_backend_can_refcount 0
110 #endif
111 #ifndef elf_backend_want_got_sym
112 #define elf_backend_want_got_sym 1
113 #endif
114 #ifndef elf_backend_gc_mark_hook
115 #define elf_backend_gc_mark_hook NULL
116 #endif
117 #ifndef elf_backend_gc_sweep_hook
118 #define elf_backend_gc_sweep_hook NULL
119 #endif
120 #ifndef bfd_elfNN_bfd_gc_sections
121 #define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
122 #endif
123
124 #ifndef bfd_elfNN_bfd_merge_sections
125 #define bfd_elfNN_bfd_merge_sections \
126 _bfd_elf_merge_sections
127 #endif
128
129 #ifndef bfd_elfNN_bfd_make_debug_symbol
130 #define bfd_elfNN_bfd_make_debug_symbol \
131 ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
132 #endif
133
134 #ifndef bfd_elfNN_bfd_copy_private_symbol_data
135 #define bfd_elfNN_bfd_copy_private_symbol_data \
136 _bfd_elf_copy_private_symbol_data
137 #endif
138
139 #ifndef bfd_elfNN_bfd_copy_private_section_data
140 #define bfd_elfNN_bfd_copy_private_section_data \
141 _bfd_elf_copy_private_section_data
142 #endif
143 #ifndef bfd_elfNN_bfd_copy_private_bfd_data
144 #define bfd_elfNN_bfd_copy_private_bfd_data \
145 _bfd_elf_copy_private_bfd_data
146 #endif
147 #ifndef bfd_elfNN_bfd_print_private_bfd_data
148 #define bfd_elfNN_bfd_print_private_bfd_data \
149 _bfd_elf_print_private_bfd_data
150 #endif
151 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
152 #define bfd_elfNN_bfd_merge_private_bfd_data \
153 ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
154 #endif
155 #ifndef bfd_elfNN_bfd_set_private_flags
156 #define bfd_elfNN_bfd_set_private_flags \
157 ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
158 #endif
159 #ifndef bfd_elfNN_bfd_is_local_label_name
160 #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
161 #endif
162
163 #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
164 #define bfd_elfNN_get_dynamic_reloc_upper_bound \
165 _bfd_elf_get_dynamic_reloc_upper_bound
166 #endif
167 #ifndef bfd_elfNN_canonicalize_dynamic_reloc
168 #define bfd_elfNN_canonicalize_dynamic_reloc \
169 _bfd_elf_canonicalize_dynamic_reloc
170 #endif
171
172 #ifdef elf_backend_relocate_section
173 #ifndef bfd_elfNN_bfd_link_hash_table_create
174 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
175 #endif
176 #else /* ! defined (elf_backend_relocate_section) */
177 /* If no backend relocate_section routine, use the generic linker.
178 Note - this will prevent the port from being able to use some of
179 the other features of the ELF linker, because the generic hash structure
180 does not have the fields needed by the ELF linker. In particular it
181 means that linking directly to S-records will not work. */
182 #ifndef bfd_elfNN_bfd_link_hash_table_create
183 #define bfd_elfNN_bfd_link_hash_table_create \
184 _bfd_generic_link_hash_table_create
185 #endif
186 #ifndef bfd_elfNN_bfd_link_add_symbols
187 #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
188 #endif
189 #ifndef bfd_elfNN_bfd_final_link
190 #define bfd_elfNN_bfd_final_link _bfd_generic_final_link
191 #endif
192 #endif /* ! defined (elf_backend_relocate_section) */
193 #ifndef bfd_elfNN_bfd_link_split_section
194 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
195 #endif
196
197 #ifndef bfd_elfNN_archive_p
198 #define bfd_elfNN_archive_p bfd_generic_archive_p
199 #endif
200
201 #ifndef bfd_elfNN_write_archive_contents
202 #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents
203 #endif
204
205 #ifndef bfd_elfNN_mkobject
206 #define bfd_elfNN_mkobject bfd_elf_mkobject
207 #endif
208
209 #ifndef bfd_elfNN_mkcorefile
210 #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
211 #endif
212
213 #ifndef bfd_elfNN_mkarchive
214 #define bfd_elfNN_mkarchive _bfd_generic_mkarchive
215 #endif
216
217 #ifndef elf_symbol_leading_char
218 #define elf_symbol_leading_char 0
219 #endif
220
221 #ifndef elf_info_to_howto
222 #define elf_info_to_howto 0
223 #endif
224
225 #ifndef elf_info_to_howto_rel
226 #define elf_info_to_howto_rel 0
227 #endif
228
229 #ifndef ELF_MAXPAGESIZE
230 #error ELF_MAXPAGESIZE is not defined
231 #define ELF_MAXPAGESIZE 1
232 #endif
233
234 #ifndef elf_backend_collect
235 #define elf_backend_collect false
236 #endif
237 #ifndef elf_backend_type_change_ok
238 #define elf_backend_type_change_ok false
239 #endif
240
241 #ifndef elf_backend_sym_is_global
242 #define elf_backend_sym_is_global 0
243 #endif
244 #ifndef elf_backend_object_p
245 #define elf_backend_object_p 0
246 #endif
247 #ifndef elf_backend_symbol_processing
248 #define elf_backend_symbol_processing 0
249 #endif
250 #ifndef elf_backend_symbol_table_processing
251 #define elf_backend_symbol_table_processing 0
252 #endif
253 #ifndef elf_backend_get_symbol_type
254 #define elf_backend_get_symbol_type 0
255 #endif
256 #ifndef elf_backend_section_processing
257 #define elf_backend_section_processing 0
258 #endif
259 #ifndef elf_backend_section_from_shdr
260 #define elf_backend_section_from_shdr 0
261 #endif
262 #ifndef elf_backend_section_flags
263 #define elf_backend_section_flags 0
264 #endif
265 #ifndef elf_backend_section_from_phdr
266 #define elf_backend_section_from_phdr 0
267 #endif
268 #ifndef elf_backend_fake_sections
269 #define elf_backend_fake_sections 0
270 #endif
271 #ifndef elf_backend_section_from_bfd_section
272 #define elf_backend_section_from_bfd_section 0
273 #endif
274 #ifndef elf_backend_add_symbol_hook
275 #define elf_backend_add_symbol_hook 0
276 #endif
277 #ifndef elf_backend_link_output_symbol_hook
278 #define elf_backend_link_output_symbol_hook 0
279 #endif
280 #ifndef elf_backend_create_dynamic_sections
281 #define elf_backend_create_dynamic_sections 0
282 #endif
283 #ifndef elf_backend_check_relocs
284 #define elf_backend_check_relocs 0
285 #endif
286 #ifndef elf_backend_adjust_dynamic_symbol
287 #define elf_backend_adjust_dynamic_symbol 0
288 #endif
289 #ifndef elf_backend_always_size_sections
290 #define elf_backend_always_size_sections 0
291 #endif
292 #ifndef elf_backend_size_dynamic_sections
293 #define elf_backend_size_dynamic_sections 0
294 #endif
295 #ifndef elf_backend_relocate_section
296 #define elf_backend_relocate_section 0
297 #endif
298 #ifndef elf_backend_finish_dynamic_symbol
299 #define elf_backend_finish_dynamic_symbol 0
300 #endif
301 #ifndef elf_backend_finish_dynamic_sections
302 #define elf_backend_finish_dynamic_sections 0
303 #endif
304 #ifndef elf_backend_begin_write_processing
305 #define elf_backend_begin_write_processing 0
306 #endif
307 #ifndef elf_backend_final_write_processing
308 #define elf_backend_final_write_processing 0
309 #endif
310 #ifndef elf_backend_additional_program_headers
311 #define elf_backend_additional_program_headers 0
312 #endif
313 #ifndef elf_backend_modify_segment_map
314 #define elf_backend_modify_segment_map 0
315 #endif
316 #ifndef elf_backend_ecoff_debug_swap
317 #define elf_backend_ecoff_debug_swap 0
318 #endif
319 #ifndef elf_backend_got_header_size
320 #define elf_backend_got_header_size 0
321 #endif
322 #ifndef elf_backend_plt_header_size
323 #define elf_backend_plt_header_size 0
324 #endif
325 #ifndef elf_backend_post_process_headers
326 #define elf_backend_post_process_headers NULL
327 #endif
328 #ifndef elf_backend_print_symbol_all
329 #define elf_backend_print_symbol_all NULL
330 #endif
331 #ifndef elf_backend_output_arch_syms
332 #define elf_backend_output_arch_syms NULL
333 #endif
334 #ifndef elf_backend_copy_indirect_symbol
335 #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect
336 #endif
337 #ifndef elf_backend_hide_symbol
338 #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
339 #endif
340 #ifndef elf_backend_emit_relocs
341 #define elf_backend_emit_relocs NULL
342 #endif
343 #ifndef elf_backend_count_relocs
344 #define elf_backend_count_relocs NULL
345 #endif
346 #ifndef elf_backend_grok_prstatus
347 #define elf_backend_grok_prstatus NULL
348 #endif
349 #ifndef elf_backend_grok_psinfo
350 #define elf_backend_grok_psinfo NULL
351 #endif
352 #ifndef elf_backend_sprintf_vma
353 #define elf_backend_sprintf_vma _bfd_elf_sprintf_vma
354 #endif
355 #ifndef elf_backend_fprintf_vma
356 #define elf_backend_fprintf_vma _bfd_elf_fprintf_vma
357 #endif
358 #ifndef elf_backend_reloc_type_class
359 #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class
360 #endif
361 #ifndef elf_backend_discard_info
362 #define elf_backend_discard_info NULL
363 #endif
364 #ifndef elf_backend_ignore_discarded_relocs
365 #define elf_backend_ignore_discarded_relocs NULL
366 #endif
367 #ifndef elf_backend_write_section
368 #define elf_backend_write_section NULL
369 #endif
370 #ifndef elf_backend_mips_irix_compat
371 #define elf_backend_mips_irix_compat NULL
372 #endif
373 #ifndef elf_backend_mips_rtype_to_howto
374 #define elf_backend_mips_rtype_to_howto NULL
375 #endif
376
377 /* Previously, backends could only use SHT_REL or SHT_RELA relocation
378 sections, but not both. They defined USE_REL to indicate SHT_REL
379 sections, and left it undefined to indicated SHT_RELA sections.
380 For backwards compatibility, we still support this usage. */
381 #ifndef USE_REL
382 #define USE_REL 0
383 #else
384 #undef USE_REL
385 #define USE_REL 1
386 #endif
387
388 /* Use these in new code. */
389 #ifndef elf_backend_may_use_rel_p
390 #define elf_backend_may_use_rel_p USE_REL
391 #endif
392 #ifndef elf_backend_may_use_rela_p
393 #define elf_backend_may_use_rela_p !USE_REL
394 #endif
395 #ifndef elf_backend_default_use_rela_p
396 #define elf_backend_default_use_rela_p !USE_REL
397 #endif
398
399 #ifndef ELF_MACHINE_ALT1
400 #define ELF_MACHINE_ALT1 0
401 #endif
402
403 #ifndef ELF_MACHINE_ALT2
404 #define ELF_MACHINE_ALT2 0
405 #endif
406
407 #ifndef elf_backend_size_info
408 #define elf_backend_size_info _bfd_elfNN_size_info
409 #endif
410
411 #ifndef elf_backend_sign_extend_vma
412 #define elf_backend_sign_extend_vma 0
413 #endif
414
415 extern const struct elf_size_info _bfd_elfNN_size_info;
416
417 #ifndef INCLUDED_TARGET_FILE
418 static const struct elf_backend_data elfNN_bed =
419 {
420 ELF_ARCH, /* arch */
421 ELF_MACHINE_CODE, /* elf_machine_code */
422 ELF_MAXPAGESIZE, /* maxpagesize */
423 elf_info_to_howto,
424 elf_info_to_howto_rel,
425 elf_backend_sym_is_global,
426 elf_backend_object_p,
427 elf_backend_symbol_processing,
428 elf_backend_symbol_table_processing,
429 elf_backend_get_symbol_type,
430 elf_backend_section_processing,
431 elf_backend_section_from_shdr,
432 elf_backend_section_flags,
433 elf_backend_section_from_phdr,
434 elf_backend_fake_sections,
435 elf_backend_section_from_bfd_section,
436 elf_backend_add_symbol_hook,
437 elf_backend_link_output_symbol_hook,
438 elf_backend_create_dynamic_sections,
439 elf_backend_check_relocs,
440 elf_backend_adjust_dynamic_symbol,
441 elf_backend_always_size_sections,
442 elf_backend_size_dynamic_sections,
443 elf_backend_relocate_section,
444 elf_backend_finish_dynamic_symbol,
445 elf_backend_finish_dynamic_sections,
446 elf_backend_begin_write_processing,
447 elf_backend_final_write_processing,
448 elf_backend_additional_program_headers,
449 elf_backend_modify_segment_map,
450 elf_backend_gc_mark_hook,
451 elf_backend_gc_sweep_hook,
452 elf_backend_post_process_headers,
453 elf_backend_print_symbol_all,
454 elf_backend_output_arch_syms,
455 elf_backend_copy_indirect_symbol,
456 elf_backend_hide_symbol,
457 elf_backend_emit_relocs,
458 elf_backend_count_relocs,
459 elf_backend_grok_prstatus,
460 elf_backend_grok_psinfo,
461 elf_backend_sprintf_vma,
462 elf_backend_fprintf_vma,
463 elf_backend_reloc_type_class,
464 elf_backend_discard_info,
465 elf_backend_ignore_discarded_relocs,
466 elf_backend_write_section,
467 elf_backend_mips_irix_compat,
468 elf_backend_mips_rtype_to_howto,
469 elf_backend_ecoff_debug_swap,
470 ELF_MACHINE_ALT1,
471 ELF_MACHINE_ALT2,
472 &elf_backend_size_info,
473 elf_backend_got_symbol_offset,
474 elf_backend_got_header_size,
475 elf_backend_plt_header_size,
476 elf_backend_collect,
477 elf_backend_type_change_ok,
478 elf_backend_may_use_rel_p,
479 elf_backend_may_use_rela_p,
480 elf_backend_default_use_rela_p,
481 elf_backend_sign_extend_vma,
482 elf_backend_want_got_plt,
483 elf_backend_plt_readonly,
484 elf_backend_want_plt_sym,
485 elf_backend_plt_not_loaded,
486 elf_backend_plt_alignment,
487 elf_backend_can_gc_sections,
488 elf_backend_can_refcount,
489 elf_backend_want_got_sym,
490 elf_backend_want_dynbss
491 };
492 #endif
493
494 /* Forward declaration for use when initialising alternative_target field. */
495 #ifdef TARGET_LITTLE_SYM
496 extern const bfd_target TARGET_LITTLE_SYM;
497 #endif
498
499 #ifdef TARGET_BIG_SYM
500 const bfd_target TARGET_BIG_SYM =
501 {
502 /* name: identify kind of target */
503 TARGET_BIG_NAME,
504
505 /* flavour: general indication about file */
506 bfd_target_elf_flavour,
507
508 /* byteorder: data is big endian */
509 BFD_ENDIAN_BIG,
510
511 /* header_byteorder: header is also big endian */
512 BFD_ENDIAN_BIG,
513
514 /* object_flags: mask of all file flags */
515 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
516 | DYNAMIC | WP_TEXT | D_PAGED),
517
518 /* section_flags: mask of all section flags */
519 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
520 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
521 | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
522
523 /* leading_symbol_char: is the first char of a user symbol
524 predictable, and if so what is it */
525 elf_symbol_leading_char,
526
527 /* ar_pad_char: pad character for filenames within an archive header
528 FIXME: this really has nothing to do with ELF, this is a characteristic
529 of the archiver and/or os and should be independently tunable */
530 '/',
531
532 /* ar_max_namelen: maximum number of characters in an archive header
533 FIXME: this really has nothing to do with ELF, this is a characteristic
534 of the archiver and should be independently tunable. The System V ABI,
535 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
536 15,
537
538 /* Routines to byte-swap various sized integers from the data sections */
539 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
540 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
541 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
542
543 /* Routines to byte-swap various sized integers from the file headers */
544 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
545 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
546 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
547
548 /* bfd_check_format: check the format of a file being read */
549 { _bfd_dummy_target, /* unknown format */
550 bfd_elfNN_object_p, /* assembler/linker output (object file) */
551 bfd_elfNN_archive_p, /* an archive */
552 bfd_elfNN_core_file_p /* a core file */
553 },
554
555 /* bfd_set_format: set the format of a file being written */
556 { bfd_false,
557 bfd_elfNN_mkobject,
558 bfd_elfNN_mkarchive,
559 bfd_elfNN_mkcorefile
560 },
561
562 /* bfd_write_contents: write cached information into a file being written */
563 { bfd_false,
564 bfd_elfNN_write_object_contents,
565 bfd_elfNN_write_archive_contents,
566 bfd_elfNN_write_corefile_contents,
567 },
568
569 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
570 BFD_JUMP_TABLE_COPY (bfd_elfNN),
571 BFD_JUMP_TABLE_CORE (bfd_elfNN),
572 #ifdef bfd_elfNN_archive_functions
573 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
574 #else
575 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
576 #endif
577 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
578 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
579 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
580 BFD_JUMP_TABLE_LINK (bfd_elfNN),
581 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
582
583 /* Alternative endian target. */
584 #ifdef TARGET_LITTLE_SYM
585 & TARGET_LITTLE_SYM,
586 #else
587 NULL,
588 #endif
589
590 /* backend_data: */
591 (PTR) &elfNN_bed
592 };
593 #endif
594
595 #ifdef TARGET_LITTLE_SYM
596 const bfd_target TARGET_LITTLE_SYM =
597 {
598 /* name: identify kind of target */
599 TARGET_LITTLE_NAME,
600
601 /* flavour: general indication about file */
602 bfd_target_elf_flavour,
603
604 /* byteorder: data is little endian */
605 BFD_ENDIAN_LITTLE,
606
607 /* header_byteorder: header is also little endian */
608 BFD_ENDIAN_LITTLE,
609
610 /* object_flags: mask of all file flags */
611 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
612 | DYNAMIC | WP_TEXT | D_PAGED),
613
614 /* section_flags: mask of all section flags */
615 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
616 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
617 | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
618
619 /* leading_symbol_char: is the first char of a user symbol
620 predictable, and if so what is it */
621 elf_symbol_leading_char,
622
623 /* ar_pad_char: pad character for filenames within an archive header
624 FIXME: this really has nothing to do with ELF, this is a characteristic
625 of the archiver and/or os and should be independently tunable */
626 '/',
627
628 /* ar_max_namelen: maximum number of characters in an archive header
629 FIXME: this really has nothing to do with ELF, this is a characteristic
630 of the archiver and should be independently tunable. The System V ABI,
631 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
632 15,
633
634 /* Routines to byte-swap various sized integers from the data sections */
635 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
636 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
637 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
638
639 /* Routines to byte-swap various sized integers from the file headers */
640 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
641 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
642 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
643
644 /* bfd_check_format: check the format of a file being read */
645 { _bfd_dummy_target, /* unknown format */
646 bfd_elfNN_object_p, /* assembler/linker output (object file) */
647 bfd_elfNN_archive_p, /* an archive */
648 bfd_elfNN_core_file_p /* a core file */
649 },
650
651 /* bfd_set_format: set the format of a file being written */
652 { bfd_false,
653 bfd_elfNN_mkobject,
654 bfd_elfNN_mkarchive,
655 bfd_elfNN_mkcorefile
656 },
657
658 /* bfd_write_contents: write cached information into a file being written */
659 { bfd_false,
660 bfd_elfNN_write_object_contents,
661 bfd_elfNN_write_archive_contents,
662 bfd_elfNN_write_corefile_contents,
663 },
664
665 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
666 BFD_JUMP_TABLE_COPY (bfd_elfNN),
667 BFD_JUMP_TABLE_CORE (bfd_elfNN),
668 #ifdef bfd_elfNN_archive_functions
669 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
670 #else
671 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
672 #endif
673 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
674 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
675 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
676 BFD_JUMP_TABLE_LINK (bfd_elfNN),
677 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
678
679 /* Alternative endian target. */
680 #ifdef TARGET_BIG_SYM
681 & TARGET_BIG_SYM,
682 #else
683 NULL,
684 #endif
685
686 /* backend_data: */
687 (PTR) &elfNN_bed
688 };
689 #endif