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