Automatic date update in version.in
[binutils-gdb.git] / bfd / elfxx-target.h
1 /* Target definitions for NN-bit ELF
2 Copyright (C) 1993-2022 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 3 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., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
20
21
22 /* This structure contains everything that BFD knows about a target.
23 It includes things like its byte order, name, what routines to call
24 to do various operations, etc. Every BFD points to a target structure
25 with its "xvec" member.
26
27 There are two such structures here: one for big-endian machines and
28 one for little-endian machines. */
29
30 #ifndef bfd_elfNN_close_and_cleanup
31 #define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup
32 #endif
33 #ifndef bfd_elfNN_bfd_free_cached_info
34 #define bfd_elfNN_bfd_free_cached_info _bfd_free_cached_info
35 #endif
36 #ifndef bfd_elfNN_get_section_contents
37 #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
38 #endif
39
40 #define bfd_elfNN_canonicalize_dynamic_symtab \
41 _bfd_elf_canonicalize_dynamic_symtab
42 #ifndef bfd_elfNN_get_synthetic_symtab
43 #define bfd_elfNN_get_synthetic_symtab \
44 _bfd_elf_get_synthetic_symtab
45 #endif
46 #ifndef bfd_elfNN_canonicalize_reloc
47 #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc
48 #endif
49 #ifndef bfd_elfNN_set_reloc
50 #define bfd_elfNN_set_reloc _bfd_generic_set_reloc
51 #endif
52 #ifndef bfd_elfNN_find_nearest_line
53 #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
54 #endif
55 #ifndef bfd_elfNN_find_line
56 #define bfd_elfNN_find_line _bfd_elf_find_line
57 #endif
58 #ifndef bfd_elfNN_find_inliner_info
59 #define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info
60 #endif
61 #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols
62 #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
63 #define bfd_elfNN_get_dynamic_symtab_upper_bound \
64 _bfd_elf_get_dynamic_symtab_upper_bound
65 #define bfd_elfNN_get_lineno _bfd_elf_get_lineno
66 #ifndef bfd_elfNN_get_reloc_upper_bound
67 #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
68 #endif
69 #ifndef bfd_elfNN_get_symbol_info
70 #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info
71 #endif
72 #ifndef bfd_elfNN_get_symbol_version_string
73 #define bfd_elfNN_get_symbol_version_string \
74 _bfd_elf_get_symbol_version_string
75 #endif
76 #define bfd_elfNN_canonicalize_symtab _bfd_elf_canonicalize_symtab
77 #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
78 #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol
79 #ifndef bfd_elfNN_new_section_hook
80 #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook
81 #endif
82 #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach
83 #ifndef bfd_elfNN_set_section_contents
84 #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents
85 #endif
86 #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers
87 #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents
88 #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents
89
90 #define bfd_elfNN_get_section_contents_in_window \
91 _bfd_generic_get_section_contents_in_window
92
93 #ifndef elf_backend_can_refcount
94 #define elf_backend_can_refcount 0
95 #endif
96 #ifndef elf_backend_want_got_plt
97 #define elf_backend_want_got_plt 0
98 #endif
99 #ifndef elf_backend_plt_readonly
100 #define elf_backend_plt_readonly 0
101 #endif
102 #ifndef elf_backend_want_plt_sym
103 #define elf_backend_want_plt_sym 0
104 #endif
105 #ifndef elf_backend_plt_not_loaded
106 #define elf_backend_plt_not_loaded 0
107 #endif
108 #ifndef elf_backend_plt_alignment
109 #define elf_backend_plt_alignment 2
110 #endif
111 #ifndef elf_backend_want_dynbss
112 #define elf_backend_want_dynbss 1
113 #endif
114 #ifndef elf_backend_want_dynrelro
115 #define elf_backend_want_dynrelro 0
116 #endif
117 #ifndef elf_backend_want_p_paddr_set_to_zero
118 #define elf_backend_want_p_paddr_set_to_zero 0
119 #endif
120 #ifndef elf_backend_no_page_alias
121 #define elf_backend_no_page_alias 0
122 #endif
123 #ifndef elf_backend_default_execstack
124 #define elf_backend_default_execstack 1
125 #endif
126 #ifndef elf_backend_caches_rawsize
127 #define elf_backend_caches_rawsize 0
128 #endif
129 #ifndef elf_backend_extern_protected_data
130 #define elf_backend_extern_protected_data 0
131 #endif
132 #ifndef elf_backend_always_renumber_dynsyms
133 #define elf_backend_always_renumber_dynsyms false
134 #endif
135 #ifndef elf_backend_linux_prpsinfo32_ugid16
136 #define elf_backend_linux_prpsinfo32_ugid16 false
137 #endif
138 #ifndef elf_backend_linux_prpsinfo64_ugid16
139 #define elf_backend_linux_prpsinfo64_ugid16 false
140 #endif
141 #ifndef elf_backend_stack_align
142 #define elf_backend_stack_align 16
143 #endif
144 #ifndef elf_backend_strtab_flags
145 #define elf_backend_strtab_flags 0
146 #endif
147
148 #define bfd_elfNN_bfd_debug_info_start _bfd_void_bfd
149 #define bfd_elfNN_bfd_debug_info_end _bfd_void_bfd
150 #define bfd_elfNN_bfd_debug_info_accumulate _bfd_void_bfd_asection
151
152 #ifndef bfd_elfNN_bfd_get_relocated_section_contents
153 #define bfd_elfNN_bfd_get_relocated_section_contents \
154 bfd_generic_get_relocated_section_contents
155 #endif
156
157 #ifndef bfd_elfNN_bfd_relax_section
158 #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section
159 #endif
160
161 #ifndef elf_backend_can_gc_sections
162 #define elf_backend_can_gc_sections 0
163 #endif
164 #ifndef elf_backend_can_refcount
165 #define elf_backend_can_refcount 0
166 #endif
167 #ifndef elf_backend_want_got_sym
168 #define elf_backend_want_got_sym 1
169 #endif
170 #ifndef elf_backend_gc_keep
171 #define elf_backend_gc_keep _bfd_elf_gc_keep
172 #endif
173 #ifndef elf_backend_gc_mark_dynamic_ref
174 #define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol
175 #endif
176 #ifndef elf_backend_gc_mark_hook
177 #define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook
178 #endif
179 #ifndef elf_backend_gc_mark_extra_sections
180 #define elf_backend_gc_mark_extra_sections _bfd_elf_gc_mark_extra_sections
181 #endif
182 #ifndef bfd_elfNN_bfd_gc_sections
183 #define bfd_elfNN_bfd_gc_sections bfd_elf_gc_sections
184 #endif
185
186 #ifndef bfd_elfNN_bfd_merge_sections
187 #define bfd_elfNN_bfd_merge_sections \
188 _bfd_elf_merge_sections
189 #endif
190
191 #ifndef bfd_elfNN_bfd_is_group_section
192 #define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
193 #endif
194
195 #ifndef bfd_elfNN_bfd_group_name
196 #define bfd_elfNN_bfd_group_name bfd_elf_group_name
197 #endif
198
199 #ifndef bfd_elfNN_bfd_discard_group
200 #define bfd_elfNN_bfd_discard_group bfd_generic_discard_group
201 #endif
202
203 #ifndef bfd_elfNN_section_already_linked
204 #define bfd_elfNN_section_already_linked \
205 _bfd_elf_section_already_linked
206 #endif
207
208 #ifndef bfd_elfNN_bfd_define_common_symbol
209 #define bfd_elfNN_bfd_define_common_symbol bfd_generic_define_common_symbol
210 #endif
211
212 #ifndef bfd_elfNN_bfd_link_hide_symbol
213 #define bfd_elfNN_bfd_link_hide_symbol _bfd_elf_link_hide_symbol
214 #endif
215
216 #ifndef bfd_elfNN_bfd_lookup_section_flags
217 #define bfd_elfNN_bfd_lookup_section_flags bfd_elf_lookup_section_flags
218 #endif
219
220 #ifndef bfd_elfNN_bfd_make_debug_symbol
221 #define bfd_elfNN_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
222 #endif
223
224 #ifndef bfd_elfNN_bfd_copy_private_symbol_data
225 #define bfd_elfNN_bfd_copy_private_symbol_data \
226 _bfd_elf_copy_private_symbol_data
227 #endif
228
229 #ifndef bfd_elfNN_bfd_copy_private_section_data
230 #define bfd_elfNN_bfd_copy_private_section_data \
231 _bfd_elf_copy_private_section_data
232 #endif
233 #ifndef bfd_elfNN_bfd_copy_private_header_data
234 #define bfd_elfNN_bfd_copy_private_header_data \
235 _bfd_elf_copy_private_header_data
236 #endif
237 #ifndef bfd_elfNN_bfd_copy_private_bfd_data
238 #define bfd_elfNN_bfd_copy_private_bfd_data \
239 _bfd_elf_copy_private_bfd_data
240 #endif
241 #ifndef bfd_elfNN_bfd_print_private_bfd_data
242 #define bfd_elfNN_bfd_print_private_bfd_data \
243 _bfd_elf_print_private_bfd_data
244 #endif
245 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
246 #define bfd_elfNN_bfd_merge_private_bfd_data _bfd_bool_bfd_link_true
247 #endif
248 #ifndef bfd_elfNN_bfd_set_private_flags
249 #define bfd_elfNN_bfd_set_private_flags _bfd_bool_bfd_uint_true
250 #endif
251 #ifndef bfd_elfNN_bfd_is_local_label_name
252 #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
253 #endif
254 #ifndef bfd_elfNN_bfd_is_target_special_symbol
255 #define bfd_elfNN_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
256 #endif
257
258 #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
259 #define bfd_elfNN_get_dynamic_reloc_upper_bound \
260 _bfd_elf_get_dynamic_reloc_upper_bound
261 #endif
262 #ifndef bfd_elfNN_canonicalize_dynamic_reloc
263 #define bfd_elfNN_canonicalize_dynamic_reloc \
264 _bfd_elf_canonicalize_dynamic_reloc
265 #endif
266
267 #ifdef elf_backend_relocate_section
268 #ifndef bfd_elfNN_bfd_link_hash_table_create
269 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
270 #endif
271 #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
272 #define bfd_elfNN_bfd_copy_link_hash_symbol_type \
273 _bfd_elf_copy_link_hash_symbol_type
274 #endif
275 #ifndef bfd_elfNN_bfd_link_add_symbols
276 #define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols
277 #endif
278 #ifndef bfd_elfNN_bfd_define_start_stop
279 #define bfd_elfNN_bfd_define_start_stop bfd_elf_define_start_stop
280 #endif
281 #ifndef bfd_elfNN_bfd_final_link
282 #define bfd_elfNN_bfd_final_link bfd_elf_final_link
283 #endif
284 #else /* ! defined (elf_backend_relocate_section) */
285 /* If no backend relocate_section routine, use the generic linker.
286 Note - this will prevent the port from being able to use some of
287 the other features of the ELF linker, because the generic hash structure
288 does not have the fields needed by the ELF linker. In particular it
289 means that linking directly to S-records will not work. */
290 #ifndef bfd_elfNN_bfd_link_hash_table_create
291 #define bfd_elfNN_bfd_link_hash_table_create \
292 _bfd_generic_link_hash_table_create
293 #endif
294 #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
295 #define bfd_elfNN_bfd_copy_link_hash_symbol_type \
296 _bfd_generic_copy_link_hash_symbol_type
297 #endif
298 #ifndef bfd_elfNN_bfd_link_add_symbols
299 #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
300 #endif
301 #ifndef bfd_elfNN_bfd_define_start_stop
302 #define bfd_elfNN_bfd_define_start_stop bfd_generic_define_start_stop
303 #endif
304 #ifndef bfd_elfNN_bfd_final_link
305 #define bfd_elfNN_bfd_final_link _bfd_generic_final_link
306 #endif
307 #endif /* ! defined (elf_backend_relocate_section) */
308
309 #ifndef bfd_elfNN_bfd_link_just_syms
310 #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms
311 #endif
312
313 #ifndef bfd_elfNN_bfd_link_split_section
314 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
315 #endif
316
317 #ifndef bfd_elfNN_bfd_link_check_relocs
318 #define bfd_elfNN_bfd_link_check_relocs _bfd_elf_link_check_relocs
319 #endif
320
321 #ifndef bfd_elfNN_archive_p
322 #define bfd_elfNN_archive_p bfd_generic_archive_p
323 #endif
324
325 #ifndef bfd_elfNN_write_archive_contents
326 #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents
327 #endif
328
329 #ifndef bfd_elfNN_mkobject
330 #define bfd_elfNN_mkobject bfd_elf_make_object
331 #endif
332
333 #ifndef bfd_elfNN_mkcorefile
334 #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
335 #endif
336
337 #ifndef bfd_elfNN_mkarchive
338 #define bfd_elfNN_mkarchive _bfd_generic_mkarchive
339 #endif
340
341 #ifndef bfd_elfNN_print_symbol
342 #define bfd_elfNN_print_symbol bfd_elf_print_symbol
343 #endif
344
345 #ifndef elf_symbol_leading_char
346 #define elf_symbol_leading_char 0
347 #endif
348
349 #ifndef elf_info_to_howto
350 #define elf_info_to_howto NULL
351 #endif
352
353 #ifndef elf_info_to_howto_rel
354 #define elf_info_to_howto_rel NULL
355 #endif
356
357 #ifndef elf_backend_arch_data
358 #define elf_backend_arch_data NULL
359 #endif
360
361 #ifndef ELF_TARGET_ID
362 #define ELF_TARGET_ID GENERIC_ELF_DATA
363 #endif
364
365 #ifndef ELF_TARGET_OS
366 #define ELF_TARGET_OS is_normal
367 #endif
368
369 #ifndef ELF_OSABI
370 #define ELF_OSABI ELFOSABI_NONE
371 #endif
372
373 #ifndef ELF_MAXPAGESIZE
374 # error ELF_MAXPAGESIZE is not defined
375 #define ELF_MAXPAGESIZE 1
376 #endif
377
378 #ifndef ELF_COMMONPAGESIZE
379 #define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE
380 #endif
381
382 #ifndef ELF_RELROPAGESIZE
383 #define ELF_RELROPAGESIZE ELF_COMMONPAGESIZE
384 #endif
385
386 #ifndef ELF_MINPAGESIZE
387 #define ELF_MINPAGESIZE ELF_COMMONPAGESIZE
388 #endif
389
390 #if ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE
391 # error ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE
392 #endif
393 #if ELF_RELROPAGESIZE > ELF_MAXPAGESIZE
394 # error ELF_RELROPAGESIZE > ELF_MAXPAGESIZE
395 #endif
396 #if ELF_MINPAGESIZE > ELF_COMMONPAGESIZE
397 # error ELF_MINPAGESIZE > ELF_COMMONPAGESIZE
398 #endif
399 #if ELF_MINPAGESIZE > ELF_RELROPAGESIZE
400 # error ELF_MINPAGESIZE > ELF_RELROPAGESIZE
401 #endif
402
403 #ifndef ELF_P_ALIGN
404 #define ELF_P_ALIGN 0
405 #endif
406
407 #ifndef ELF_DYNAMIC_SEC_FLAGS
408 /* Note that we set the SEC_IN_MEMORY flag for these sections. */
409 #define ELF_DYNAMIC_SEC_FLAGS \
410 (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \
411 | SEC_IN_MEMORY | SEC_LINKER_CREATED)
412 #endif
413
414 #ifndef elf_backend_collect
415 #define elf_backend_collect false
416 #endif
417 #ifndef elf_backend_type_change_ok
418 #define elf_backend_type_change_ok false
419 #endif
420
421 #ifndef elf_backend_sym_is_global
422 #define elf_backend_sym_is_global 0
423 #endif
424 #ifndef elf_backend_object_p
425 #define elf_backend_object_p 0
426 #endif
427 #ifndef elf_backend_symbol_processing
428 #define elf_backend_symbol_processing 0
429 #endif
430 #ifndef elf_backend_symbol_table_processing
431 #define elf_backend_symbol_table_processing 0
432 #endif
433 #ifndef elf_backend_get_symbol_type
434 #define elf_backend_get_symbol_type 0
435 #endif
436 #ifndef elf_backend_archive_symbol_lookup
437 #define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup
438 #endif
439 #ifndef elf_backend_name_local_section_symbols
440 #define elf_backend_name_local_section_symbols 0
441 #endif
442 #ifndef elf_backend_section_processing
443 #define elf_backend_section_processing 0
444 #endif
445 #ifndef elf_backend_section_from_shdr
446 #define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr
447 #endif
448 #ifndef elf_backend_section_flags
449 #define elf_backend_section_flags 0
450 #endif
451 #ifndef elf_backend_get_sec_type_attr
452 #define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr
453 #endif
454 #ifndef elf_backend_section_from_phdr
455 #define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr
456 #endif
457 #ifndef elf_backend_fake_sections
458 #define elf_backend_fake_sections 0
459 #endif
460 #ifndef elf_backend_section_from_bfd_section
461 #define elf_backend_section_from_bfd_section 0
462 #endif
463 #ifndef elf_backend_add_symbol_hook
464 #define elf_backend_add_symbol_hook 0
465 #endif
466 #ifndef elf_backend_link_output_symbol_hook
467 #define elf_backend_link_output_symbol_hook 0
468 #endif
469 #ifndef elf_backend_create_dynamic_sections
470 #define elf_backend_create_dynamic_sections 0
471 #endif
472 #ifndef elf_backend_omit_section_dynsym
473 #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_default
474 #endif
475 #ifndef elf_backend_relocs_compatible
476 #define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible
477 #endif
478 #ifndef elf_backend_check_relocs
479 #define elf_backend_check_relocs 0
480 #endif
481 #ifndef elf_backend_size_relative_relocs
482 #define elf_backend_size_relative_relocs 0
483 #endif
484 #ifndef elf_backend_finish_relative_relocs
485 #define elf_backend_finish_relative_relocs 0
486 #endif
487 #ifndef elf_backend_check_directives
488 #define elf_backend_check_directives 0
489 #endif
490 #ifndef elf_backend_notice_as_needed
491 #define elf_backend_notice_as_needed _bfd_elf_notice_as_needed
492 #endif
493 #ifndef elf_backend_adjust_dynamic_symbol
494 #define elf_backend_adjust_dynamic_symbol 0
495 #endif
496 #ifndef elf_backend_always_size_sections
497 #define elf_backend_always_size_sections 0
498 #endif
499 #ifndef elf_backend_size_dynamic_sections
500 #define elf_backend_size_dynamic_sections 0
501 #endif
502 #ifndef elf_backend_strip_zero_sized_dynamic_sections
503 #define elf_backend_strip_zero_sized_dynamic_sections 0
504 #endif
505 #ifndef elf_backend_init_index_section
506 #define elf_backend_init_index_section _bfd_void_bfd_link
507 #endif
508 #ifndef elf_backend_relocate_section
509 #define elf_backend_relocate_section 0
510 #endif
511 #ifndef elf_backend_finish_dynamic_symbol
512 #define elf_backend_finish_dynamic_symbol 0
513 #endif
514 #ifndef elf_backend_finish_dynamic_sections
515 #define elf_backend_finish_dynamic_sections 0
516 #endif
517 #ifndef elf_backend_begin_write_processing
518 #define elf_backend_begin_write_processing 0
519 #endif
520 #ifndef elf_backend_final_write_processing
521 #define elf_backend_final_write_processing _bfd_elf_final_write_processing
522 #endif
523 #ifndef elf_backend_additional_program_headers
524 #define elf_backend_additional_program_headers 0
525 #endif
526 #ifndef elf_backend_modify_segment_map
527 #define elf_backend_modify_segment_map 0
528 #endif
529 #ifndef elf_backend_modify_headers
530 #define elf_backend_modify_headers _bfd_elf_modify_headers
531 #endif
532 #ifndef elf_backend_allow_non_load_phdr
533 #define elf_backend_allow_non_load_phdr 0
534 #endif
535 #ifndef elf_backend_ecoff_debug_swap
536 #define elf_backend_ecoff_debug_swap 0
537 #endif
538 #ifndef elf_backend_bfd_from_remote_memory
539 #define elf_backend_bfd_from_remote_memory _bfd_elfNN_bfd_from_remote_memory
540 #endif
541 #ifndef elf_backend_core_find_build_id
542 #define elf_backend_core_find_build_id _bfd_elfNN_core_find_build_id
543 #endif
544 #ifndef elf_backend_got_header_size
545 #define elf_backend_got_header_size 0
546 #endif
547 #ifndef elf_backend_got_elt_size
548 #define elf_backend_got_elt_size _bfd_elf_default_got_elt_size
549 #endif
550 #ifndef elf_backend_obj_attrs_vendor
551 #define elf_backend_obj_attrs_vendor NULL
552 #endif
553 #ifndef elf_backend_obj_attrs_section
554 #define elf_backend_obj_attrs_section NULL
555 #endif
556 #ifndef elf_backend_obj_attrs_arg_type
557 #define elf_backend_obj_attrs_arg_type NULL
558 #endif
559 #ifndef elf_backend_obj_attrs_section_type
560 #define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES
561 #endif
562 #ifndef elf_backend_obj_attrs_order
563 #define elf_backend_obj_attrs_order NULL
564 #endif
565 #ifndef elf_backend_obj_attrs_handle_unknown
566 #define elf_backend_obj_attrs_handle_unknown NULL
567 #endif
568 #ifndef elf_backend_parse_gnu_properties
569 #define elf_backend_parse_gnu_properties NULL
570 #endif
571 #ifndef elf_backend_merge_gnu_properties
572 #define elf_backend_merge_gnu_properties NULL
573 #endif
574 #ifndef elf_backend_setup_gnu_properties
575 #define elf_backend_setup_gnu_properties _bfd_elf_link_setup_gnu_properties
576 #endif
577 #ifndef elf_backend_fixup_gnu_properties
578 #define elf_backend_fixup_gnu_properties NULL
579 #endif
580 #ifndef elf_backend_static_tls_alignment
581 #define elf_backend_static_tls_alignment 1
582 #endif
583 #ifndef elf_backend_init_file_header
584 #define elf_backend_init_file_header _bfd_elf_init_file_header
585 #endif
586 #ifndef elf_backend_print_symbol_all
587 #define elf_backend_print_symbol_all NULL
588 #endif
589 #ifndef elf_backend_output_arch_local_syms
590 #define elf_backend_output_arch_local_syms NULL
591 #endif
592 #ifndef elf_backend_output_arch_syms
593 #define elf_backend_output_arch_syms NULL
594 #endif
595 #ifndef elf_backend_filter_implib_symbols
596 #define elf_backend_filter_implib_symbols NULL
597 #endif
598 #ifndef elf_backend_copy_indirect_symbol
599 #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect
600 #endif
601 #ifndef elf_backend_hide_symbol
602 #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
603 #endif
604 #ifndef elf_backend_fixup_symbol
605 #define elf_backend_fixup_symbol NULL
606 #endif
607 #ifndef elf_backend_merge_symbol_attribute
608 #define elf_backend_merge_symbol_attribute NULL
609 #endif
610 #ifndef elf_backend_get_target_dtag
611 #define elf_backend_get_target_dtag NULL
612 #endif
613 #ifndef elf_backend_ignore_undef_symbol
614 #define elf_backend_ignore_undef_symbol NULL
615 #endif
616 #ifndef elf_backend_emit_relocs
617 #define elf_backend_emit_relocs _bfd_elf_link_output_relocs
618 #endif
619 #ifndef elf_backend_update_relocs
620 #define elf_backend_update_relocs NULL
621 #endif
622 #ifndef elf_backend_count_relocs
623 #define elf_backend_count_relocs NULL
624 #endif
625 #ifndef elf_backend_count_additional_relocs
626 #define elf_backend_count_additional_relocs NULL
627 #endif
628 #ifndef elf_backend_sort_relocs_p
629 #define elf_backend_sort_relocs_p NULL
630 #endif
631 #ifndef elf_backend_grok_prstatus
632 #define elf_backend_grok_prstatus NULL
633 #endif
634 #ifndef elf_backend_grok_psinfo
635 #define elf_backend_grok_psinfo NULL
636 #endif
637 #ifndef elf_backend_grok_freebsd_prstatus
638 #define elf_backend_grok_freebsd_prstatus NULL
639 #endif
640 #ifndef elf_backend_write_core_note
641 #define elf_backend_write_core_note NULL
642 #endif
643 #ifndef elf_backend_lookup_section_flags_hook
644 #define elf_backend_lookup_section_flags_hook NULL
645 #endif
646 #ifndef elf_backend_reloc_type_class
647 #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class
648 #endif
649 #ifndef elf_backend_discard_info
650 #define elf_backend_discard_info NULL
651 #endif
652 #ifndef elf_backend_ignore_discarded_relocs
653 #define elf_backend_ignore_discarded_relocs NULL
654 #endif
655 #ifndef elf_backend_action_discarded
656 #define elf_backend_action_discarded _bfd_elf_default_action_discarded
657 #endif
658 #ifndef elf_backend_eh_frame_address_size
659 #define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size
660 #endif
661 #ifndef elf_backend_can_make_relative_eh_frame
662 #define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative
663 #endif
664 #ifndef elf_backend_can_make_lsda_relative_eh_frame
665 #define elf_backend_can_make_lsda_relative_eh_frame _bfd_elf_can_make_relative
666 #endif
667 #ifndef elf_backend_encode_eh_address
668 #define elf_backend_encode_eh_address _bfd_elf_encode_eh_address
669 #endif
670 #ifndef elf_backend_write_section
671 #define elf_backend_write_section NULL
672 #endif
673 #ifndef elf_backend_elfsym_local_is_section
674 #define elf_backend_elfsym_local_is_section NULL
675 #endif
676 #ifndef elf_backend_mips_irix_compat
677 #define elf_backend_mips_irix_compat NULL
678 #endif
679 #ifndef elf_backend_mips_rtype_to_howto
680 #define elf_backend_mips_rtype_to_howto NULL
681 #endif
682
683 /* Previously, backends could only use SHT_REL or SHT_RELA relocation
684 sections, but not both. They defined USE_REL to indicate SHT_REL
685 sections, and left it undefined to indicated SHT_RELA sections.
686 For backwards compatibility, we still support this usage. */
687 #ifndef USE_REL
688 #define USE_REL 0
689 #endif
690
691 /* Use these in new code. */
692 #ifndef elf_backend_may_use_rel_p
693 #define elf_backend_may_use_rel_p USE_REL
694 #endif
695 #ifndef elf_backend_may_use_rela_p
696 #define elf_backend_may_use_rela_p !USE_REL
697 #endif
698 #ifndef elf_backend_default_use_rela_p
699 #define elf_backend_default_use_rela_p !USE_REL
700 #endif
701 #ifndef elf_backend_rela_plts_and_copies_p
702 #define elf_backend_rela_plts_and_copies_p elf_backend_default_use_rela_p
703 #endif
704
705 #ifndef elf_backend_rela_normal
706 #define elf_backend_rela_normal 0
707 #endif
708
709 #ifndef elf_backend_dtrel_excludes_plt
710 #define elf_backend_dtrel_excludes_plt 0
711 #endif
712
713 #ifndef elf_backend_plt_sym_val
714 #define elf_backend_plt_sym_val NULL
715 #endif
716 #ifndef elf_backend_relplt_name
717 #define elf_backend_relplt_name NULL
718 #endif
719
720 #ifndef ELF_MACHINE_ALT1
721 #define ELF_MACHINE_ALT1 0
722 #endif
723
724 #ifndef ELF_MACHINE_ALT2
725 #define ELF_MACHINE_ALT2 0
726 #endif
727
728 #ifndef elf_backend_size_info
729 #define elf_backend_size_info _bfd_elfNN_size_info
730 #endif
731
732 #ifndef elf_backend_special_sections
733 #define elf_backend_special_sections NULL
734 #endif
735
736 #ifndef elf_backend_sign_extend_vma
737 #define elf_backend_sign_extend_vma 0
738 #endif
739
740 #ifndef elf_backend_link_order_error_handler
741 #define elf_backend_link_order_error_handler _bfd_error_handler
742 #endif
743
744 #ifndef elf_backend_common_definition
745 #define elf_backend_common_definition _bfd_elf_common_definition
746 #endif
747
748 #ifndef elf_backend_common_section_index
749 #define elf_backend_common_section_index _bfd_elf_common_section_index
750 #endif
751
752 #ifndef elf_backend_common_section
753 #define elf_backend_common_section _bfd_elf_common_section
754 #endif
755
756 #ifndef elf_backend_merge_symbol
757 #define elf_backend_merge_symbol NULL
758 #endif
759
760 #ifndef elf_backend_hash_symbol
761 #define elf_backend_hash_symbol _bfd_elf_hash_symbol
762 #endif
763
764 #ifndef elf_backend_record_xhash_symbol
765 #define elf_backend_record_xhash_symbol NULL
766 #endif
767
768 #ifndef elf_backend_is_function_type
769 #define elf_backend_is_function_type _bfd_elf_is_function_type
770 #endif
771
772 #ifndef elf_backend_maybe_function_sym
773 #define elf_backend_maybe_function_sym _bfd_elf_maybe_function_sym
774 #endif
775
776 #ifndef elf_backend_get_reloc_section
777 #define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section
778 #endif
779
780 #ifndef elf_backend_copy_special_section_fields
781 #define elf_backend_copy_special_section_fields _bfd_elf_copy_special_section_fields
782 #endif
783
784 #ifndef elf_backend_compact_eh_encoding
785 #define elf_backend_compact_eh_encoding NULL
786 #endif
787
788 #ifndef elf_backend_cant_unwind_opcode
789 #define elf_backend_cant_unwind_opcode NULL
790 #endif
791
792 #ifndef elf_backend_init_secondary_reloc_section
793 #define elf_backend_init_secondary_reloc_section _bfd_elf_init_secondary_reloc_section
794 #endif
795
796 #ifndef elf_backend_slurp_secondary_reloc_section
797 #define elf_backend_slurp_secondary_reloc_section _bfd_elf_slurp_secondary_reloc_section
798 #endif
799
800 #ifndef elf_backend_write_secondary_reloc_section
801 #define elf_backend_write_secondary_reloc_section _bfd_elf_write_secondary_reloc_section
802 #endif
803
804 #ifndef elf_backend_symbol_section_index
805 #define elf_backend_symbol_section_index NULL
806 #endif
807
808 #ifndef elf_match_priority
809 #define elf_match_priority \
810 (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0)
811 #endif
812
813 extern const struct elf_size_info _bfd_elfNN_size_info;
814
815 static const struct elf_backend_data elfNN_bed =
816 {
817 ELF_ARCH, /* arch */
818 ELF_TARGET_ID, /* target_id */
819 ELF_TARGET_OS, /* target_os */
820 ELF_MACHINE_CODE, /* elf_machine_code */
821 ELF_OSABI, /* elf_osabi */
822 ELF_MAXPAGESIZE, /* maxpagesize */
823 ELF_MINPAGESIZE, /* minpagesize */
824 ELF_COMMONPAGESIZE, /* commonpagesize */
825 ELF_RELROPAGESIZE, /* commonpagesize to use with -z relro */
826 ELF_P_ALIGN, /* p_align */
827 ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */
828 elf_backend_arch_data,
829 elf_info_to_howto,
830 elf_info_to_howto_rel,
831 elf_backend_sym_is_global,
832 elf_backend_object_p,
833 elf_backend_symbol_processing,
834 elf_backend_symbol_table_processing,
835 elf_backend_get_symbol_type,
836 elf_backend_archive_symbol_lookup,
837 elf_backend_name_local_section_symbols,
838 elf_backend_section_processing,
839 elf_backend_section_from_shdr,
840 elf_backend_section_flags,
841 elf_backend_get_sec_type_attr,
842 elf_backend_section_from_phdr,
843 elf_backend_fake_sections,
844 elf_backend_section_from_bfd_section,
845 elf_backend_add_symbol_hook,
846 elf_backend_link_output_symbol_hook,
847 elf_backend_create_dynamic_sections,
848 elf_backend_omit_section_dynsym,
849 elf_backend_relocs_compatible,
850 elf_backend_check_relocs,
851 elf_backend_size_relative_relocs,
852 elf_backend_finish_relative_relocs,
853 elf_backend_check_directives,
854 elf_backend_notice_as_needed,
855 elf_backend_adjust_dynamic_symbol,
856 elf_backend_always_size_sections,
857 elf_backend_size_dynamic_sections,
858 elf_backend_strip_zero_sized_dynamic_sections,
859 elf_backend_init_index_section,
860 elf_backend_relocate_section,
861 elf_backend_finish_dynamic_symbol,
862 elf_backend_finish_dynamic_sections,
863 elf_backend_begin_write_processing,
864 elf_backend_final_write_processing,
865 elf_backend_additional_program_headers,
866 elf_backend_modify_segment_map,
867 elf_backend_modify_headers,
868 elf_backend_allow_non_load_phdr,
869 elf_backend_gc_keep,
870 elf_backend_gc_mark_dynamic_ref,
871 elf_backend_gc_mark_hook,
872 elf_backend_gc_mark_extra_sections,
873 elf_backend_init_file_header,
874 elf_backend_print_symbol_all,
875 elf_backend_output_arch_local_syms,
876 elf_backend_output_arch_syms,
877 elf_backend_filter_implib_symbols,
878 elf_backend_copy_indirect_symbol,
879 elf_backend_hide_symbol,
880 elf_backend_fixup_symbol,
881 elf_backend_merge_symbol_attribute,
882 elf_backend_get_target_dtag,
883 elf_backend_ignore_undef_symbol,
884 elf_backend_emit_relocs,
885 elf_backend_update_relocs,
886 elf_backend_count_relocs,
887 elf_backend_count_additional_relocs,
888 elf_backend_sort_relocs_p,
889 elf_backend_grok_prstatus,
890 elf_backend_grok_psinfo,
891 elf_backend_grok_freebsd_prstatus,
892 elf_backend_write_core_note,
893 elf_backend_lookup_section_flags_hook,
894 elf_backend_reloc_type_class,
895 elf_backend_discard_info,
896 elf_backend_ignore_discarded_relocs,
897 elf_backend_action_discarded,
898 elf_backend_eh_frame_address_size,
899 elf_backend_can_make_relative_eh_frame,
900 elf_backend_can_make_lsda_relative_eh_frame,
901 elf_backend_encode_eh_address,
902 elf_backend_write_section,
903 elf_backend_elfsym_local_is_section,
904 elf_backend_mips_irix_compat,
905 elf_backend_mips_rtype_to_howto,
906 elf_backend_ecoff_debug_swap,
907 elf_backend_bfd_from_remote_memory,
908 elf_backend_core_find_build_id,
909 elf_backend_plt_sym_val,
910 elf_backend_common_definition,
911 elf_backend_common_section_index,
912 elf_backend_common_section,
913 elf_backend_merge_symbol,
914 elf_backend_hash_symbol,
915 elf_backend_record_xhash_symbol,
916 elf_backend_is_function_type,
917 elf_backend_maybe_function_sym,
918 elf_backend_get_reloc_section,
919 elf_backend_copy_special_section_fields,
920 elf_backend_link_order_error_handler,
921 elf_backend_relplt_name,
922 ELF_MACHINE_ALT1,
923 ELF_MACHINE_ALT2,
924 &elf_backend_size_info,
925 elf_backend_special_sections,
926 elf_backend_got_header_size,
927 elf_backend_got_elt_size,
928 elf_backend_obj_attrs_vendor,
929 elf_backend_obj_attrs_section,
930 elf_backend_obj_attrs_arg_type,
931 elf_backend_obj_attrs_section_type,
932 elf_backend_obj_attrs_order,
933 elf_backend_obj_attrs_handle_unknown,
934 elf_backend_parse_gnu_properties,
935 elf_backend_merge_gnu_properties,
936 elf_backend_setup_gnu_properties,
937 elf_backend_fixup_gnu_properties,
938 elf_backend_compact_eh_encoding,
939 elf_backend_cant_unwind_opcode,
940 elf_backend_symbol_section_index,
941 elf_backend_init_secondary_reloc_section,
942 elf_backend_slurp_secondary_reloc_section,
943 elf_backend_write_secondary_reloc_section,
944 elf_backend_static_tls_alignment,
945 elf_backend_stack_align,
946 elf_backend_strtab_flags,
947 elf_backend_collect,
948 elf_backend_type_change_ok,
949 elf_backend_may_use_rel_p,
950 elf_backend_may_use_rela_p,
951 elf_backend_default_use_rela_p,
952 elf_backend_rela_plts_and_copies_p,
953 elf_backend_rela_normal,
954 elf_backend_dtrel_excludes_plt,
955 elf_backend_sign_extend_vma,
956 elf_backend_want_got_plt,
957 elf_backend_plt_readonly,
958 elf_backend_want_plt_sym,
959 elf_backend_plt_not_loaded,
960 elf_backend_plt_alignment,
961 elf_backend_can_gc_sections,
962 elf_backend_can_refcount,
963 elf_backend_want_got_sym,
964 elf_backend_want_dynbss,
965 elf_backend_want_dynrelro,
966 elf_backend_want_p_paddr_set_to_zero,
967 elf_backend_no_page_alias,
968 elf_backend_default_execstack,
969 elf_backend_caches_rawsize,
970 elf_backend_extern_protected_data,
971 elf_backend_always_renumber_dynsyms,
972 elf_backend_linux_prpsinfo32_ugid16,
973 elf_backend_linux_prpsinfo64_ugid16
974 };
975
976 /* Forward declaration for use when initialising alternative_target field. */
977 #ifdef TARGET_LITTLE_SYM
978 extern const bfd_target TARGET_LITTLE_SYM;
979 #endif
980
981 #ifdef TARGET_BIG_SYM
982 const bfd_target TARGET_BIG_SYM =
983 {
984 /* name: identify kind of target */
985 TARGET_BIG_NAME,
986
987 /* flavour: general indication about file */
988 bfd_target_elf_flavour,
989
990 /* byteorder: data is big endian */
991 BFD_ENDIAN_BIG,
992
993 /* header_byteorder: header is also big endian */
994 BFD_ENDIAN_BIG,
995
996 /* object_flags: mask of all file flags */
997 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
998 | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
999 | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON),
1000
1001 /* section_flags: mask of all section flags */
1002 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
1003 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
1004 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
1005
1006 /* leading_symbol_char: is the first char of a user symbol
1007 predictable, and if so what is it */
1008 elf_symbol_leading_char,
1009
1010 /* ar_pad_char: pad character for filenames within an archive header
1011 FIXME: this really has nothing to do with ELF, this is a characteristic
1012 of the archiver and/or os and should be independently tunable */
1013 '/',
1014
1015 /* ar_max_namelen: maximum number of characters in an archive header
1016 FIXME: this really has nothing to do with ELF, this is a characteristic
1017 of the archiver and should be independently tunable. The System V ABI,
1018 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
1019 15,
1020
1021 elf_match_priority,
1022
1023 /* TRUE if unused section symbols should be kept. */
1024 TARGET_KEEP_UNUSED_SECTION_SYMBOLS,
1025
1026 /* Routines to byte-swap various sized integers from the data sections */
1027 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
1028 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
1029 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
1030
1031 /* Routines to byte-swap various sized integers from the file headers */
1032 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
1033 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
1034 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
1035
1036 /* bfd_check_format: check the format of a file being read */
1037 { _bfd_dummy_target, /* unknown format */
1038 bfd_elfNN_object_p, /* assembler/linker output (object file) */
1039 bfd_elfNN_archive_p, /* an archive */
1040 bfd_elfNN_core_file_p /* a core file */
1041 },
1042
1043 /* bfd_set_format: set the format of a file being written */
1044 { _bfd_bool_bfd_false_error,
1045 bfd_elfNN_mkobject,
1046 bfd_elfNN_mkarchive,
1047 bfd_elfNN_mkcorefile
1048 },
1049
1050 /* bfd_write_contents: write cached information into a file being written */
1051 { _bfd_bool_bfd_false_error,
1052 bfd_elfNN_write_object_contents,
1053 bfd_elfNN_write_archive_contents,
1054 bfd_elfNN_write_corefile_contents,
1055 },
1056
1057 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
1058 BFD_JUMP_TABLE_COPY (bfd_elfNN),
1059 BFD_JUMP_TABLE_CORE (bfd_elfNN),
1060 #ifdef bfd_elfNN_archive_functions
1061 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
1062 #elif defined USE_64_BIT_ARCHIVE
1063 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
1064 #else
1065 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
1066 #endif
1067 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
1068 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
1069 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
1070 BFD_JUMP_TABLE_LINK (bfd_elfNN),
1071 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
1072
1073 /* Alternative endian target. */
1074 #ifdef TARGET_LITTLE_SYM
1075 & TARGET_LITTLE_SYM,
1076 #else
1077 NULL,
1078 #endif
1079
1080 /* backend_data: */
1081 &elfNN_bed
1082 };
1083 #endif
1084
1085 #ifdef TARGET_LITTLE_SYM
1086 const bfd_target TARGET_LITTLE_SYM =
1087 {
1088 /* name: identify kind of target */
1089 TARGET_LITTLE_NAME,
1090
1091 /* flavour: general indication about file */
1092 bfd_target_elf_flavour,
1093
1094 /* byteorder: data is little endian */
1095 BFD_ENDIAN_LITTLE,
1096
1097 /* header_byteorder: header is also little endian */
1098 BFD_ENDIAN_LITTLE,
1099
1100 /* object_flags: mask of all file flags */
1101 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
1102 | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
1103 | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON),
1104
1105 /* section_flags: mask of all section flags */
1106 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
1107 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
1108 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
1109
1110 /* leading_symbol_char: is the first char of a user symbol
1111 predictable, and if so what is it */
1112 elf_symbol_leading_char,
1113
1114 /* ar_pad_char: pad character for filenames within an archive header
1115 FIXME: this really has nothing to do with ELF, this is a characteristic
1116 of the archiver and/or os and should be independently tunable */
1117 '/',
1118
1119 /* ar_max_namelen: maximum number of characters in an archive header
1120 FIXME: this really has nothing to do with ELF, this is a characteristic
1121 of the archiver and should be independently tunable. The System V ABI,
1122 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
1123 15,
1124
1125 elf_match_priority,
1126
1127 /* TRUE if unused section symbols should be kept. */
1128 TARGET_KEEP_UNUSED_SECTION_SYMBOLS,
1129
1130 /* Routines to byte-swap various sized integers from the data sections */
1131 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
1132 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
1133 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
1134
1135 /* Routines to byte-swap various sized integers from the file headers */
1136 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
1137 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
1138 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
1139
1140 /* bfd_check_format: check the format of a file being read */
1141 { _bfd_dummy_target, /* unknown format */
1142 bfd_elfNN_object_p, /* assembler/linker output (object file) */
1143 bfd_elfNN_archive_p, /* an archive */
1144 bfd_elfNN_core_file_p /* a core file */
1145 },
1146
1147 /* bfd_set_format: set the format of a file being written */
1148 { _bfd_bool_bfd_false_error,
1149 bfd_elfNN_mkobject,
1150 bfd_elfNN_mkarchive,
1151 bfd_elfNN_mkcorefile
1152 },
1153
1154 /* bfd_write_contents: write cached information into a file being written */
1155 { _bfd_bool_bfd_false_error,
1156 bfd_elfNN_write_object_contents,
1157 bfd_elfNN_write_archive_contents,
1158 bfd_elfNN_write_corefile_contents,
1159 },
1160
1161 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
1162 BFD_JUMP_TABLE_COPY (bfd_elfNN),
1163 BFD_JUMP_TABLE_CORE (bfd_elfNN),
1164 #ifdef bfd_elfNN_archive_functions
1165 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
1166 #elif defined USE_64_BIT_ARCHIVE
1167 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
1168 #else
1169 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
1170 #endif
1171 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
1172 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
1173 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
1174 BFD_JUMP_TABLE_LINK (bfd_elfNN),
1175 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
1176
1177 /* Alternative endian target. */
1178 #ifdef TARGET_BIG_SYM
1179 & TARGET_BIG_SYM,
1180 #else
1181 NULL,
1182 #endif
1183
1184 /* backend_data: */
1185 &elfNN_bed
1186 };
1187 #endif