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