Support x86 Intel MSR_IMM
[binutils-gdb.git] / bfd / elfxx-target.h
blobd10391dcb43ca6cebda67417773b9036a55a8d80
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_is_group_section
191 #define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
192 #endif
194 #ifndef bfd_elfNN_bfd_group_name
195 #define bfd_elfNN_bfd_group_name bfd_elf_group_name
196 #endif
198 #ifndef bfd_elfNN_bfd_discard_group
199 #define bfd_elfNN_bfd_discard_group bfd_generic_discard_group
200 #endif
202 #ifndef bfd_elfNN_section_already_linked
203 #define bfd_elfNN_section_already_linked \
204 _bfd_elf_section_already_linked
205 #endif
207 #ifndef bfd_elfNN_bfd_define_common_symbol
208 #define bfd_elfNN_bfd_define_common_symbol bfd_generic_define_common_symbol
209 #endif
211 #ifndef bfd_elfNN_bfd_link_hide_symbol
212 #define bfd_elfNN_bfd_link_hide_symbol _bfd_elf_link_hide_symbol
213 #endif
215 #ifndef bfd_elfNN_bfd_lookup_section_flags
216 #define bfd_elfNN_bfd_lookup_section_flags bfd_elf_lookup_section_flags
217 #endif
219 #ifndef bfd_elfNN_bfd_make_debug_symbol
220 #define bfd_elfNN_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
221 #endif
223 #ifndef bfd_elfNN_bfd_copy_private_symbol_data
224 #define bfd_elfNN_bfd_copy_private_symbol_data \
225 _bfd_elf_copy_private_symbol_data
226 #endif
228 #define bfd_elfNN_init_private_section_data \
229 _bfd_elf_init_private_section_data
230 #ifndef bfd_elfNN_bfd_copy_private_section_data
231 #define bfd_elfNN_bfd_copy_private_section_data \
232 _bfd_elf_copy_private_section_data
233 #endif
234 #ifndef bfd_elfNN_bfd_copy_private_header_data
235 #define bfd_elfNN_bfd_copy_private_header_data \
236 _bfd_elf_copy_private_header_data
237 #endif
238 #ifndef bfd_elfNN_bfd_copy_private_bfd_data
239 #define bfd_elfNN_bfd_copy_private_bfd_data \
240 _bfd_elf_copy_private_bfd_data
241 #endif
242 #ifndef bfd_elfNN_bfd_print_private_bfd_data
243 #define bfd_elfNN_bfd_print_private_bfd_data \
244 _bfd_elf_print_private_bfd_data
245 #endif
246 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
247 #define bfd_elfNN_bfd_merge_private_bfd_data _bfd_bool_bfd_link_true
248 #endif
249 #ifndef bfd_elfNN_bfd_set_private_flags
250 #define bfd_elfNN_bfd_set_private_flags _bfd_bool_bfd_uint_true
251 #endif
252 #ifndef bfd_elfNN_bfd_is_local_label_name
253 #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
254 #endif
255 #ifndef bfd_elfNN_bfd_is_target_special_symbol
256 #define bfd_elfNN_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
257 #endif
259 #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
260 #define bfd_elfNN_get_dynamic_reloc_upper_bound \
261 _bfd_elf_get_dynamic_reloc_upper_bound
262 #endif
263 #ifndef bfd_elfNN_canonicalize_dynamic_reloc
264 #define bfd_elfNN_canonicalize_dynamic_reloc \
265 _bfd_elf_canonicalize_dynamic_reloc
266 #endif
268 #ifdef elf_backend_relocate_section
269 #ifndef bfd_elfNN_bfd_link_hash_table_create
270 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
271 #endif
272 #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
273 #define bfd_elfNN_bfd_copy_link_hash_symbol_type \
274 _bfd_elf_copy_link_hash_symbol_type
275 #endif
276 #ifndef bfd_elfNN_bfd_link_add_symbols
277 #define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols
278 #endif
279 #ifndef bfd_elfNN_bfd_define_start_stop
280 #define bfd_elfNN_bfd_define_start_stop bfd_elf_define_start_stop
281 #endif
282 #ifndef bfd_elfNN_bfd_final_link
283 #define bfd_elfNN_bfd_final_link bfd_elf_final_link
284 #endif
285 #ifndef bfd_elfNN_bfd_merge_sections
286 #define bfd_elfNN_bfd_merge_sections _bfd_elf_merge_sections
287 #endif
288 #else /* ! defined (elf_backend_relocate_section) */
289 /* If no backend relocate_section routine, use the generic linker.
290 Note - this will prevent the port from being able to use some of
291 the other features of the ELF linker, because the generic hash structure
292 does not have the fields needed by the ELF linker. In particular it
293 means that linking directly to S-records will not work. */
294 #ifndef bfd_elfNN_bfd_link_hash_table_create
295 #define bfd_elfNN_bfd_link_hash_table_create \
296 _bfd_generic_link_hash_table_create
297 #endif
298 #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
299 #define bfd_elfNN_bfd_copy_link_hash_symbol_type \
300 _bfd_generic_copy_link_hash_symbol_type
301 #endif
302 #ifndef bfd_elfNN_bfd_link_add_symbols
303 #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
304 #endif
305 #ifndef bfd_elfNN_bfd_define_start_stop
306 #define bfd_elfNN_bfd_define_start_stop bfd_generic_define_start_stop
307 #endif
308 #ifndef bfd_elfNN_bfd_final_link
309 #define bfd_elfNN_bfd_final_link _bfd_generic_final_link
310 #endif
311 #ifndef bfd_elfNN_bfd_merge_sections
312 #define bfd_elfNN_bfd_merge_sections bfd_generic_merge_sections
313 #endif
314 #endif /* ! defined (elf_backend_relocate_section) */
316 #ifndef bfd_elfNN_bfd_link_just_syms
317 #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms
318 #endif
320 #ifndef bfd_elfNN_bfd_link_split_section
321 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
322 #endif
324 #ifndef bfd_elfNN_bfd_link_check_relocs
325 #define bfd_elfNN_bfd_link_check_relocs _bfd_elf_link_check_relocs
326 #endif
328 #ifndef bfd_elfNN_archive_p
329 #define bfd_elfNN_archive_p bfd_generic_archive_p
330 #endif
332 #ifndef bfd_elfNN_write_archive_contents
333 #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents
334 #endif
336 #ifndef bfd_elfNN_mkobject
337 #define bfd_elfNN_mkobject bfd_elf_make_object
338 #endif
340 #ifndef bfd_elfNN_mkcorefile
341 #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
342 #endif
344 #ifndef bfd_elfNN_mkarchive
345 #define bfd_elfNN_mkarchive _bfd_generic_mkarchive
346 #endif
348 #ifndef bfd_elfNN_print_symbol
349 #define bfd_elfNN_print_symbol bfd_elf_print_symbol
350 #endif
352 #ifndef elf_symbol_leading_char
353 #define elf_symbol_leading_char 0
354 #endif
356 #ifndef elf_info_to_howto
357 #define elf_info_to_howto NULL
358 #endif
360 #ifndef elf_info_to_howto_rel
361 #define elf_info_to_howto_rel NULL
362 #endif
364 #ifndef elf_backend_arch_data
365 #define elf_backend_arch_data NULL
366 #endif
368 #ifndef ELF_TARGET_ID
369 #define ELF_TARGET_ID GENERIC_ELF_DATA
370 #endif
372 #ifndef ELF_TARGET_OS
373 #define ELF_TARGET_OS is_normal
374 #endif
376 #ifndef ELF_OSABI
377 #define ELF_OSABI ELFOSABI_NONE
378 #endif
380 #ifndef ELF_MAXPAGESIZE
381 # error ELF_MAXPAGESIZE is not defined
382 #define ELF_MAXPAGESIZE 1
383 #endif
385 #ifndef ELF_COMMONPAGESIZE
386 #define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE
387 #endif
389 #ifndef ELF_MINPAGESIZE
390 #define ELF_MINPAGESIZE ELF_COMMONPAGESIZE
391 #endif
393 #if ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE
394 # error ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE
395 #endif
396 #if ELF_MINPAGESIZE > ELF_COMMONPAGESIZE
397 # error ELF_MINPAGESIZE > ELF_COMMONPAGESIZE
398 #endif
400 #ifndef ELF_P_ALIGN
401 #define ELF_P_ALIGN 0
402 #endif
404 #ifndef ELF_DYNAMIC_SEC_FLAGS
405 /* Note that we set the SEC_IN_MEMORY flag for these sections. */
406 #define ELF_DYNAMIC_SEC_FLAGS \
407 (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \
408 | SEC_IN_MEMORY | SEC_LINKER_CREATED)
409 #endif
411 #ifndef elf_backend_collect
412 #define elf_backend_collect false
413 #endif
414 #ifndef elf_backend_type_change_ok
415 #define elf_backend_type_change_ok false
416 #endif
418 #ifndef elf_backend_sym_is_global
419 #define elf_backend_sym_is_global 0
420 #endif
421 #ifndef elf_backend_object_p
422 #define elf_backend_object_p 0
423 #endif
424 #ifndef elf_backend_symbol_processing
425 #define elf_backend_symbol_processing 0
426 #endif
427 #ifndef elf_backend_symbol_table_processing
428 #define elf_backend_symbol_table_processing 0
429 #endif
430 #ifndef elf_backend_get_symbol_type
431 #define elf_backend_get_symbol_type 0
432 #endif
433 #ifndef elf_backend_archive_symbol_lookup
434 #define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup
435 #endif
436 #ifndef elf_backend_name_local_section_symbols
437 #define elf_backend_name_local_section_symbols 0
438 #endif
439 #ifndef elf_backend_section_processing
440 #define elf_backend_section_processing 0
441 #endif
442 #ifndef elf_backend_section_from_shdr
443 #define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr
444 #endif
445 #ifndef elf_backend_section_flags
446 #define elf_backend_section_flags 0
447 #endif
448 #ifndef elf_backend_get_sec_type_attr
449 #define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr
450 #endif
451 #ifndef elf_backend_section_from_phdr
452 #define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr
453 #endif
454 #ifndef elf_backend_fake_sections
455 #define elf_backend_fake_sections 0
456 #endif
457 #ifndef elf_backend_section_from_bfd_section
458 #define elf_backend_section_from_bfd_section 0
459 #endif
460 #ifndef elf_backend_add_symbol_hook
461 #define elf_backend_add_symbol_hook 0
462 #endif
463 #ifndef elf_backend_link_output_symbol_hook
464 #define elf_backend_link_output_symbol_hook 0
465 #endif
466 #ifndef elf_backend_create_dynamic_sections
467 #define elf_backend_create_dynamic_sections 0
468 #endif
469 #ifndef elf_backend_omit_section_dynsym
470 #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_default
471 #endif
472 #ifndef elf_backend_relocs_compatible
473 #define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible
474 #endif
475 #ifndef elf_backend_check_relocs
476 #define elf_backend_check_relocs 0
477 #endif
478 #ifndef elf_backend_size_relative_relocs
479 #define elf_backend_size_relative_relocs 0
480 #endif
481 #ifndef elf_backend_finish_relative_relocs
482 #define elf_backend_finish_relative_relocs 0
483 #endif
484 #ifndef elf_backend_check_directives
485 #define elf_backend_check_directives 0
486 #endif
487 #ifndef elf_backend_notice_as_needed
488 #define elf_backend_notice_as_needed _bfd_elf_notice_as_needed
489 #endif
490 #ifndef elf_backend_adjust_dynamic_symbol
491 #define elf_backend_adjust_dynamic_symbol 0
492 #endif
493 #ifndef elf_backend_early_size_sections
494 #define elf_backend_early_size_sections 0
495 #endif
496 #ifndef elf_backend_late_size_sections
497 #define elf_backend_late_size_sections 0
498 #endif
499 #ifndef elf_backend_strip_zero_sized_dynamic_sections
500 #define elf_backend_strip_zero_sized_dynamic_sections 0
501 #endif
502 #ifndef elf_backend_init_index_section
503 #define elf_backend_init_index_section _bfd_void_bfd_link
504 #endif
505 #ifndef elf_backend_relocate_section
506 #define elf_backend_relocate_section 0
507 #endif
508 #ifndef elf_backend_finish_dynamic_symbol
509 #define elf_backend_finish_dynamic_symbol 0
510 #endif
511 #ifndef elf_backend_finish_dynamic_sections
512 #define elf_backend_finish_dynamic_sections 0
513 #endif
514 #ifndef elf_backend_begin_write_processing
515 #define elf_backend_begin_write_processing 0
516 #endif
517 #ifndef elf_backend_final_write_processing
518 #define elf_backend_final_write_processing _bfd_elf_final_write_processing
519 #endif
520 #ifndef elf_backend_additional_program_headers
521 #define elf_backend_additional_program_headers 0
522 #endif
523 #ifndef elf_backend_modify_segment_map
524 #define elf_backend_modify_segment_map 0
525 #endif
526 #ifndef elf_backend_modify_headers
527 #define elf_backend_modify_headers _bfd_elf_modify_headers
528 #endif
529 #ifndef elf_backend_allow_non_load_phdr
530 #define elf_backend_allow_non_load_phdr 0
531 #endif
532 #ifndef elf_backend_ecoff_debug_swap
533 #define elf_backend_ecoff_debug_swap 0
534 #endif
535 #ifndef elf_backend_bfd_from_remote_memory
536 #define elf_backend_bfd_from_remote_memory _bfd_elfNN_bfd_from_remote_memory
537 #endif
538 #ifndef elf_backend_core_find_build_id
539 #define elf_backend_core_find_build_id _bfd_elfNN_core_find_build_id
540 #endif
541 #ifndef elf_backend_got_header_size
542 #define elf_backend_got_header_size 0
543 #endif
544 #ifndef elf_backend_got_elt_size
545 #define elf_backend_got_elt_size _bfd_elf_default_got_elt_size
546 #endif
547 #ifndef elf_backend_obj_attrs_vendor
548 #define elf_backend_obj_attrs_vendor NULL
549 #endif
550 #ifndef elf_backend_obj_attrs_section
551 #define elf_backend_obj_attrs_section NULL
552 #endif
553 #ifndef elf_backend_obj_attrs_arg_type
554 #define elf_backend_obj_attrs_arg_type NULL
555 #endif
556 #ifndef elf_backend_obj_attrs_section_type
557 #define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES
558 #endif
559 #ifndef elf_backend_obj_attrs_order
560 #define elf_backend_obj_attrs_order NULL
561 #endif
562 #ifndef elf_backend_obj_attrs_handle_unknown
563 #define elf_backend_obj_attrs_handle_unknown NULL
564 #endif
565 #ifndef elf_backend_parse_gnu_properties
566 #define elf_backend_parse_gnu_properties NULL
567 #endif
568 #ifndef elf_backend_merge_gnu_properties
569 #define elf_backend_merge_gnu_properties NULL
570 #endif
571 #ifndef elf_backend_setup_gnu_properties
572 #define elf_backend_setup_gnu_properties _bfd_elf_link_setup_gnu_properties
573 #endif
574 #ifndef elf_backend_fixup_gnu_properties
575 #define elf_backend_fixup_gnu_properties NULL
576 #endif
577 #ifndef elf_backend_static_tls_alignment
578 #define elf_backend_static_tls_alignment 1
579 #endif
580 #ifndef elf_backend_init_file_header
581 #define elf_backend_init_file_header _bfd_elf_init_file_header
582 #endif
583 #ifndef elf_backend_print_symbol_all
584 #define elf_backend_print_symbol_all NULL
585 #endif
586 #ifndef elf_backend_output_arch_local_syms
587 #define elf_backend_output_arch_local_syms NULL
588 #endif
589 #ifndef elf_backend_output_arch_syms
590 #define elf_backend_output_arch_syms NULL
591 #endif
592 #ifndef elf_backend_filter_implib_symbols
593 #define elf_backend_filter_implib_symbols NULL
594 #endif
595 #ifndef elf_backend_copy_indirect_symbol
596 #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect
597 #endif
598 #ifndef elf_backend_hide_symbol
599 #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
600 #endif
601 #ifndef elf_backend_fixup_symbol
602 #define elf_backend_fixup_symbol NULL
603 #endif
604 #ifndef elf_backend_merge_symbol_attribute
605 #define elf_backend_merge_symbol_attribute NULL
606 #endif
607 #ifndef elf_backend_get_target_dtag
608 #define elf_backend_get_target_dtag NULL
609 #endif
610 #ifndef elf_backend_ignore_undef_symbol
611 #define elf_backend_ignore_undef_symbol NULL
612 #endif
613 #ifndef elf_backend_emit_relocs
614 #define elf_backend_emit_relocs _bfd_elf_link_output_relocs
615 #endif
616 #ifndef elf_backend_update_relocs
617 #define elf_backend_update_relocs NULL
618 #endif
619 #ifndef elf_backend_count_relocs
620 #define elf_backend_count_relocs NULL
621 #endif
622 #ifndef elf_backend_count_additional_relocs
623 #define elf_backend_count_additional_relocs NULL
624 #endif
625 #ifndef elf_backend_sort_relocs_p
626 #define elf_backend_sort_relocs_p NULL
627 #endif
628 #ifndef elf_backend_grok_prstatus
629 #define elf_backend_grok_prstatus NULL
630 #endif
631 #ifndef elf_backend_grok_psinfo
632 #define elf_backend_grok_psinfo NULL
633 #endif
634 #ifndef elf_backend_grok_freebsd_prstatus
635 #define elf_backend_grok_freebsd_prstatus NULL
636 #endif
637 #ifndef elf_backend_write_core_note
638 #define elf_backend_write_core_note NULL
639 #endif
640 #ifndef elf_backend_lookup_section_flags_hook
641 #define elf_backend_lookup_section_flags_hook NULL
642 #endif
643 #ifndef elf_backend_reloc_type_class
644 #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class
645 #endif
646 #ifndef elf_backend_discard_info
647 #define elf_backend_discard_info NULL
648 #endif
649 #ifndef elf_backend_ignore_discarded_relocs
650 #define elf_backend_ignore_discarded_relocs NULL
651 #endif
652 #ifndef elf_backend_action_discarded
653 #define elf_backend_action_discarded _bfd_elf_default_action_discarded
654 #endif
655 #ifndef elf_backend_eh_frame_address_size
656 #define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size
657 #endif
658 #ifndef elf_backend_can_make_relative_eh_frame
659 #define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative
660 #endif
661 #ifndef elf_backend_can_make_lsda_relative_eh_frame
662 #define elf_backend_can_make_lsda_relative_eh_frame _bfd_elf_can_make_relative
663 #endif
664 #ifndef elf_backend_can_make_multiple_eh_frame
665 #define elf_backend_can_make_multiple_eh_frame 0
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_add_glibc_version_dependency
674 #define elf_backend_add_glibc_version_dependency \
675 _bfd_elf_link_add_dt_relr_dependency
676 #endif
677 #ifndef elf_backend_elfsym_local_is_section
678 #define elf_backend_elfsym_local_is_section NULL
679 #endif
680 #ifndef elf_backend_mips_irix_compat
681 #define elf_backend_mips_irix_compat NULL
682 #endif
683 #ifndef elf_backend_mips_rtype_to_howto
684 #define elf_backend_mips_rtype_to_howto NULL
685 #endif
687 /* Previously, backends could only use SHT_REL or SHT_RELA relocation
688 sections, but not both. They defined USE_REL to indicate SHT_REL
689 sections, and left it undefined to indicated SHT_RELA sections.
690 For backwards compatibility, we still support this usage. */
691 #ifndef USE_REL
692 #define USE_REL 0
693 #endif
695 /* Use these in new code. */
696 #ifndef elf_backend_may_use_rel_p
697 #define elf_backend_may_use_rel_p USE_REL
698 #endif
699 #ifndef elf_backend_may_use_rela_p
700 #define elf_backend_may_use_rela_p !USE_REL
701 #endif
702 #ifndef elf_backend_default_use_rela_p
703 #define elf_backend_default_use_rela_p !USE_REL
704 #endif
705 #ifndef elf_backend_rela_plts_and_copies_p
706 #define elf_backend_rela_plts_and_copies_p elf_backend_default_use_rela_p
707 #endif
709 #ifndef elf_backend_rela_normal
710 #define elf_backend_rela_normal 0
711 #endif
713 #ifndef elf_backend_dtrel_excludes_plt
714 #define elf_backend_dtrel_excludes_plt 0
715 #endif
717 #ifndef elf_backend_plt_sym_val
718 #define elf_backend_plt_sym_val NULL
719 #endif
720 #ifndef elf_backend_relplt_name
721 #define elf_backend_relplt_name NULL
722 #endif
724 #ifndef ELF_MACHINE_ALT1
725 #define ELF_MACHINE_ALT1 0
726 #endif
728 #ifndef ELF_MACHINE_ALT2
729 #define ELF_MACHINE_ALT2 0
730 #endif
732 #ifndef elf_backend_size_info
733 #define elf_backend_size_info _bfd_elfNN_size_info
734 #endif
736 #ifndef elf_backend_special_sections
737 #define elf_backend_special_sections NULL
738 #endif
740 #ifndef elf_backend_sign_extend_vma
741 #define elf_backend_sign_extend_vma 0
742 #endif
744 #ifndef elf_backend_link_order_error_handler
745 #define elf_backend_link_order_error_handler _bfd_error_handler
746 #endif
748 #ifndef elf_backend_common_definition
749 #define elf_backend_common_definition _bfd_elf_common_definition
750 #endif
752 #ifndef elf_backend_common_section_index
753 #define elf_backend_common_section_index _bfd_elf_common_section_index
754 #endif
756 #ifndef elf_backend_common_section
757 #define elf_backend_common_section _bfd_elf_common_section
758 #endif
760 #ifndef elf_backend_merge_symbol
761 #define elf_backend_merge_symbol NULL
762 #endif
764 #ifndef elf_backend_hash_symbol
765 #define elf_backend_hash_symbol _bfd_elf_hash_symbol
766 #endif
768 #ifndef elf_backend_record_xhash_symbol
769 #define elf_backend_record_xhash_symbol NULL
770 #endif
772 #ifndef elf_backend_is_function_type
773 #define elf_backend_is_function_type _bfd_elf_is_function_type
774 #endif
776 #ifndef elf_backend_maybe_function_sym
777 #define elf_backend_maybe_function_sym _bfd_elf_maybe_function_sym
778 #endif
780 #ifndef elf_backend_get_reloc_section
781 #define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section
782 #endif
784 #ifndef elf_backend_copy_special_section_fields
785 #define elf_backend_copy_special_section_fields _bfd_elf_copy_special_section_fields
786 #endif
788 #ifndef elf_backend_compact_eh_encoding
789 #define elf_backend_compact_eh_encoding NULL
790 #endif
792 #ifndef elf_backend_cant_unwind_opcode
793 #define elf_backend_cant_unwind_opcode NULL
794 #endif
796 #ifndef elf_backend_init_secondary_reloc_section
797 #define elf_backend_init_secondary_reloc_section _bfd_elf_init_secondary_reloc_section
798 #endif
800 #ifndef elf_backend_slurp_secondary_reloc_section
801 #define elf_backend_slurp_secondary_reloc_section _bfd_elf_slurp_secondary_reloc_section
802 #endif
804 #ifndef elf_backend_write_secondary_reloc_section
805 #define elf_backend_write_secondary_reloc_section _bfd_elf_write_secondary_reloc_section
806 #endif
808 #ifndef elf_backend_symbol_section_index
809 #define elf_backend_symbol_section_index NULL
810 #endif
812 #ifndef elf_match_priority
813 #define elf_match_priority \
814 (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0)
815 #endif
817 extern const struct elf_size_info _bfd_elfNN_size_info;
819 static const struct elf_backend_data elfNN_bed =
821 ELF_ARCH, /* arch */
822 ELF_TARGET_ID, /* target_id */
823 ELF_TARGET_OS, /* target_os */
824 ELF_MACHINE_CODE, /* elf_machine_code */
825 ELF_OSABI, /* elf_osabi */
826 ELF_MAXPAGESIZE, /* maxpagesize */
827 ELF_MINPAGESIZE, /* minpagesize */
828 ELF_COMMONPAGESIZE, /* commonpagesize */
829 ELF_P_ALIGN, /* p_align */
830 ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */
831 elf_backend_arch_data,
832 elf_info_to_howto,
833 elf_info_to_howto_rel,
834 elf_backend_sym_is_global,
835 elf_backend_object_p,
836 elf_backend_symbol_processing,
837 elf_backend_symbol_table_processing,
838 elf_backend_get_symbol_type,
839 elf_backend_archive_symbol_lookup,
840 elf_backend_name_local_section_symbols,
841 elf_backend_section_processing,
842 elf_backend_section_from_shdr,
843 elf_backend_section_flags,
844 elf_backend_get_sec_type_attr,
845 elf_backend_section_from_phdr,
846 elf_backend_fake_sections,
847 elf_backend_section_from_bfd_section,
848 elf_backend_add_symbol_hook,
849 elf_backend_link_output_symbol_hook,
850 elf_backend_create_dynamic_sections,
851 elf_backend_omit_section_dynsym,
852 elf_backend_relocs_compatible,
853 elf_backend_check_relocs,
854 elf_backend_size_relative_relocs,
855 elf_backend_finish_relative_relocs,
856 elf_backend_check_directives,
857 elf_backend_notice_as_needed,
858 elf_backend_adjust_dynamic_symbol,
859 elf_backend_early_size_sections,
860 elf_backend_late_size_sections,
861 elf_backend_strip_zero_sized_dynamic_sections,
862 elf_backend_init_index_section,
863 elf_backend_relocate_section,
864 elf_backend_finish_dynamic_symbol,
865 elf_backend_finish_dynamic_sections,
866 elf_backend_begin_write_processing,
867 elf_backend_final_write_processing,
868 elf_backend_additional_program_headers,
869 elf_backend_modify_segment_map,
870 elf_backend_modify_headers,
871 elf_backend_allow_non_load_phdr,
872 elf_backend_gc_keep,
873 elf_backend_gc_mark_dynamic_ref,
874 elf_backend_gc_mark_hook,
875 elf_backend_gc_mark_extra_sections,
876 elf_backend_init_file_header,
877 elf_backend_print_symbol_all,
878 elf_backend_output_arch_local_syms,
879 elf_backend_output_arch_syms,
880 elf_backend_filter_implib_symbols,
881 elf_backend_copy_indirect_symbol,
882 elf_backend_hide_symbol,
883 elf_backend_fixup_symbol,
884 elf_backend_merge_symbol_attribute,
885 elf_backend_get_target_dtag,
886 elf_backend_ignore_undef_symbol,
887 elf_backend_emit_relocs,
888 elf_backend_update_relocs,
889 elf_backend_count_relocs,
890 elf_backend_count_additional_relocs,
891 elf_backend_sort_relocs_p,
892 elf_backend_grok_prstatus,
893 elf_backend_grok_psinfo,
894 elf_backend_grok_freebsd_prstatus,
895 elf_backend_write_core_note,
896 elf_backend_lookup_section_flags_hook,
897 elf_backend_reloc_type_class,
898 elf_backend_discard_info,
899 elf_backend_ignore_discarded_relocs,
900 elf_backend_action_discarded,
901 elf_backend_eh_frame_address_size,
902 elf_backend_can_make_relative_eh_frame,
903 elf_backend_can_make_lsda_relative_eh_frame,
904 elf_backend_can_make_multiple_eh_frame,
905 elf_backend_encode_eh_address,
906 elf_backend_write_section,
907 elf_backend_add_glibc_version_dependency,
908 elf_backend_elfsym_local_is_section,
909 elf_backend_mips_irix_compat,
910 elf_backend_mips_rtype_to_howto,
911 elf_backend_ecoff_debug_swap,
912 elf_backend_bfd_from_remote_memory,
913 elf_backend_core_find_build_id,
914 elf_backend_plt_sym_val,
915 elf_backend_common_definition,
916 elf_backend_common_section_index,
917 elf_backend_common_section,
918 elf_backend_merge_symbol,
919 elf_backend_hash_symbol,
920 elf_backend_record_xhash_symbol,
921 elf_backend_is_function_type,
922 elf_backend_maybe_function_sym,
923 elf_backend_get_reloc_section,
924 elf_backend_copy_special_section_fields,
925 elf_backend_link_order_error_handler,
926 elf_backend_relplt_name,
927 ELF_MACHINE_ALT1,
928 ELF_MACHINE_ALT2,
929 &elf_backend_size_info,
930 elf_backend_special_sections,
931 elf_backend_got_header_size,
932 elf_backend_got_elt_size,
933 elf_backend_obj_attrs_vendor,
934 elf_backend_obj_attrs_section,
935 elf_backend_obj_attrs_arg_type,
936 elf_backend_obj_attrs_section_type,
937 elf_backend_obj_attrs_order,
938 elf_backend_obj_attrs_handle_unknown,
939 elf_backend_parse_gnu_properties,
940 elf_backend_merge_gnu_properties,
941 elf_backend_setup_gnu_properties,
942 elf_backend_fixup_gnu_properties,
943 elf_backend_compact_eh_encoding,
944 elf_backend_cant_unwind_opcode,
945 elf_backend_symbol_section_index,
946 elf_backend_init_secondary_reloc_section,
947 elf_backend_slurp_secondary_reloc_section,
948 elf_backend_write_secondary_reloc_section,
949 elf_backend_static_tls_alignment,
950 elf_backend_stack_align,
951 elf_backend_strtab_flags,
952 elf_backend_collect,
953 elf_backend_type_change_ok,
954 elf_backend_may_use_rel_p,
955 elf_backend_may_use_rela_p,
956 elf_backend_default_use_rela_p,
957 elf_backend_rela_plts_and_copies_p,
958 elf_backend_rela_normal,
959 elf_backend_dtrel_excludes_plt,
960 elf_backend_sign_extend_vma,
961 elf_backend_want_got_plt,
962 elf_backend_plt_readonly,
963 elf_backend_want_plt_sym,
964 elf_backend_plt_not_loaded,
965 elf_backend_plt_alignment,
966 elf_backend_can_gc_sections,
967 elf_backend_can_refcount,
968 elf_backend_want_got_sym,
969 elf_backend_want_dynbss,
970 elf_backend_want_dynrelro,
971 elf_backend_want_p_paddr_set_to_zero,
972 elf_backend_no_page_alias,
973 elf_backend_default_execstack,
974 elf_backend_caches_rawsize,
975 elf_backend_extern_protected_data,
976 elf_backend_always_renumber_dynsyms,
977 elf_backend_linux_prpsinfo32_ugid16,
978 elf_backend_linux_prpsinfo64_ugid16,
979 elf_backend_use_mmap
982 /* Forward declaration for use when initialising alternative_target field. */
983 #ifdef TARGET_LITTLE_SYM
984 extern const bfd_target TARGET_LITTLE_SYM;
985 #endif
987 #ifdef TARGET_BIG_SYM
988 const bfd_target TARGET_BIG_SYM =
990 /* name: identify kind of target */
991 TARGET_BIG_NAME,
993 /* flavour: general indication about file */
994 bfd_target_elf_flavour,
996 /* byteorder: data is big endian */
997 BFD_ENDIAN_BIG,
999 /* header_byteorder: header is also big endian */
1000 BFD_ENDIAN_BIG,
1002 /* object_flags: mask of all file flags */
1003 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
1004 | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
1005 | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD | BFD_CONVERT_ELF_COMMON
1006 | BFD_USE_ELF_STT_COMMON | BFD_NO_SECTION_HEADER),
1008 /* section_flags: mask of all section flags */
1009 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
1010 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
1011 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
1013 /* leading_symbol_char: is the first char of a user symbol
1014 predictable, and if so what is it */
1015 elf_symbol_leading_char,
1017 /* ar_pad_char: pad character for filenames within an archive header
1018 FIXME: this really has nothing to do with ELF, this is a characteristic
1019 of the archiver and/or os and should be independently tunable */
1020 '/',
1022 /* ar_max_namelen: maximum number of characters in an archive header
1023 FIXME: this really has nothing to do with ELF, this is a characteristic
1024 of the archiver and should be independently tunable. The System V ABI,
1025 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
1028 elf_match_priority,
1030 /* TRUE if unused section symbols should be kept. */
1031 TARGET_KEEP_UNUSED_SECTION_SYMBOLS,
1033 /* Routines to byte-swap various sized integers from the data sections */
1034 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
1035 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
1036 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
1038 /* Routines to byte-swap various sized integers from the file headers */
1039 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
1040 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
1041 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
1043 /* bfd_check_format: check the format of a file being read */
1044 { _bfd_dummy_target, /* unknown format */
1045 bfd_elfNN_object_p, /* assembler/linker output (object file) */
1046 bfd_elfNN_archive_p, /* an archive */
1047 bfd_elfNN_core_file_p /* a core file */
1050 /* bfd_set_format: set the format of a file being written */
1051 { _bfd_bool_bfd_false_error,
1052 bfd_elfNN_mkobject,
1053 bfd_elfNN_mkarchive,
1054 bfd_elfNN_mkcorefile
1057 /* bfd_write_contents: write cached information into a file being written */
1058 { _bfd_bool_bfd_false_error,
1059 bfd_elfNN_write_object_contents,
1060 bfd_elfNN_write_archive_contents,
1061 bfd_elfNN_write_corefile_contents,
1064 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
1065 BFD_JUMP_TABLE_COPY (bfd_elfNN),
1066 BFD_JUMP_TABLE_CORE (bfd_elfNN),
1067 #ifdef bfd_elfNN_archive_functions
1068 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
1069 #elif defined USE_64_BIT_ARCHIVE
1070 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
1071 #else
1072 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
1073 #endif
1074 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
1075 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
1076 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
1077 BFD_JUMP_TABLE_LINK (bfd_elfNN),
1078 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
1080 /* Alternative endian target. */
1081 #ifdef TARGET_LITTLE_SYM
1082 & TARGET_LITTLE_SYM,
1083 #else
1084 NULL,
1085 #endif
1087 /* backend_data: */
1088 &elfNN_bed
1090 #endif
1092 #ifdef TARGET_LITTLE_SYM
1093 const bfd_target TARGET_LITTLE_SYM =
1095 /* name: identify kind of target */
1096 TARGET_LITTLE_NAME,
1098 /* flavour: general indication about file */
1099 bfd_target_elf_flavour,
1101 /* byteorder: data is little endian */
1102 BFD_ENDIAN_LITTLE,
1104 /* header_byteorder: header is also little endian */
1105 BFD_ENDIAN_LITTLE,
1107 /* object_flags: mask of all file flags */
1108 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
1109 | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS
1110 | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD | BFD_CONVERT_ELF_COMMON
1111 | BFD_USE_ELF_STT_COMMON | BFD_NO_SECTION_HEADER),
1113 /* section_flags: mask of all section flags */
1114 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
1115 | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
1116 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
1118 /* leading_symbol_char: is the first char of a user symbol
1119 predictable, and if so what is it */
1120 elf_symbol_leading_char,
1122 /* ar_pad_char: pad character for filenames within an archive header
1123 FIXME: this really has nothing to do with ELF, this is a characteristic
1124 of the archiver and/or os and should be independently tunable */
1125 '/',
1127 /* ar_max_namelen: maximum number of characters in an archive header
1128 FIXME: this really has nothing to do with ELF, this is a characteristic
1129 of the archiver and should be independently tunable. The System V ABI,
1130 Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
1133 elf_match_priority,
1135 /* TRUE if unused section symbols should be kept. */
1136 TARGET_KEEP_UNUSED_SECTION_SYMBOLS,
1138 /* Routines to byte-swap various sized integers from the data sections */
1139 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
1140 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
1141 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
1143 /* Routines to byte-swap various sized integers from the file headers */
1144 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
1145 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
1146 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
1148 /* bfd_check_format: check the format of a file being read */
1149 { _bfd_dummy_target, /* unknown format */
1150 bfd_elfNN_object_p, /* assembler/linker output (object file) */
1151 bfd_elfNN_archive_p, /* an archive */
1152 bfd_elfNN_core_file_p /* a core file */
1155 /* bfd_set_format: set the format of a file being written */
1156 { _bfd_bool_bfd_false_error,
1157 bfd_elfNN_mkobject,
1158 bfd_elfNN_mkarchive,
1159 bfd_elfNN_mkcorefile
1162 /* bfd_write_contents: write cached information into a file being written */
1163 { _bfd_bool_bfd_false_error,
1164 bfd_elfNN_write_object_contents,
1165 bfd_elfNN_write_archive_contents,
1166 bfd_elfNN_write_corefile_contents,
1169 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
1170 BFD_JUMP_TABLE_COPY (bfd_elfNN),
1171 BFD_JUMP_TABLE_CORE (bfd_elfNN),
1172 #ifdef bfd_elfNN_archive_functions
1173 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
1174 #elif defined USE_64_BIT_ARCHIVE
1175 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit),
1176 #else
1177 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
1178 #endif
1179 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
1180 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
1181 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
1182 BFD_JUMP_TABLE_LINK (bfd_elfNN),
1183 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
1185 /* Alternative endian target. */
1186 #ifdef TARGET_BIG_SYM
1187 & TARGET_BIG_SYM,
1188 #else
1189 NULL,
1190 #endif
1192 /* backend_data: */
1193 &elfNN_bed
1195 #endif