133965Sjdp/* Target definitions for NN-bit ELF
2130561Sobrien   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3218822Sdim   2003, 2004, 2005, 2006 Free Software Foundation, Inc.
433965Sjdp
5130561Sobrien   This file is part of BFD, the Binary File Descriptor library.
633965Sjdp
7130561Sobrien   This program is free software; you can redistribute it and/or modify
8130561Sobrien   it under the terms of the GNU General Public License as published by
9130561Sobrien   the Free Software Foundation; either version 2 of the License, or
10130561Sobrien   (at your option) any later version.
1133965Sjdp
12130561Sobrien   This program is distributed in the hope that it will be useful,
13130561Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
14130561Sobrien   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15130561Sobrien   GNU General Public License for more details.
1633965Sjdp
17130561Sobrien   You should have received a copy of the GNU General Public License
18130561Sobrien   along with this program; if not, write to the Free Software
19218822Sdim   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
2033965Sjdp
2133965Sjdp/* This structure contains everything that BFD knows about a target.
2233965Sjdp   It includes things like its byte order, name, what routines to call
2333965Sjdp   to do various operations, etc.  Every BFD points to a target structure
2433965Sjdp   with its "xvec" member.
2533965Sjdp
2633965Sjdp   There are two such structures here:  one for big-endian machines and
2733965Sjdp   one for little-endian machines.   */
2833965Sjdp
29218822Sdim#ifndef bfd_elfNN_close_and_cleanup
3038889Sjdp#define	bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup
31218822Sdim#endif
32218822Sdim#ifndef bfd_elfNN_bfd_free_cached_info
33218822Sdim#define bfd_elfNN_bfd_free_cached_info _bfd_free_cached_info
34218822Sdim#endif
3533965Sjdp#ifndef bfd_elfNN_get_section_contents
3633965Sjdp#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
3733965Sjdp#endif
3833965Sjdp
39130561Sobrien#define bfd_elfNN_canonicalize_dynamic_symtab \
40130561Sobrien  _bfd_elf_canonicalize_dynamic_symtab
41218822Sdim#ifndef bfd_elfNN_get_synthetic_symtab
42218822Sdim#define bfd_elfNN_get_synthetic_symtab \
43218822Sdim  _bfd_elf_get_synthetic_symtab
44218822Sdim#endif
45130561Sobrien#ifndef bfd_elfNN_canonicalize_reloc
4633965Sjdp#define bfd_elfNN_canonicalize_reloc	_bfd_elf_canonicalize_reloc
47130561Sobrien#endif
4833965Sjdp#ifndef bfd_elfNN_find_nearest_line
4933965Sjdp#define bfd_elfNN_find_nearest_line	_bfd_elf_find_nearest_line
5033965Sjdp#endif
51218822Sdim#ifndef bfd_elfNN_find_inliner_info
52218822Sdim#define bfd_elfNN_find_inliner_info	_bfd_elf_find_inliner_info
53218822Sdim#endif
5433965Sjdp#define bfd_elfNN_read_minisymbols	_bfd_elf_read_minisymbols
5533965Sjdp#define bfd_elfNN_minisymbol_to_symbol	_bfd_elf_minisymbol_to_symbol
56130561Sobrien#define bfd_elfNN_get_dynamic_symtab_upper_bound \
57130561Sobrien  _bfd_elf_get_dynamic_symtab_upper_bound
5833965Sjdp#define bfd_elfNN_get_lineno		_bfd_elf_get_lineno
5933965Sjdp#ifndef bfd_elfNN_get_reloc_upper_bound
6033965Sjdp#define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
6133965Sjdp#endif
62104834Sobrien#ifndef bfd_elfNN_get_symbol_info
6333965Sjdp#define bfd_elfNN_get_symbol_info	_bfd_elf_get_symbol_info
64104834Sobrien#endif
65130561Sobrien#define bfd_elfNN_canonicalize_symtab	_bfd_elf_canonicalize_symtab
6633965Sjdp#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
6733965Sjdp#define bfd_elfNN_make_empty_symbol	_bfd_elf_make_empty_symbol
68130561Sobrien#ifndef bfd_elfNN_new_section_hook
6933965Sjdp#define bfd_elfNN_new_section_hook	_bfd_elf_new_section_hook
70130561Sobrien#endif
7133965Sjdp#define bfd_elfNN_set_arch_mach		_bfd_elf_set_arch_mach
7233965Sjdp#ifndef bfd_elfNN_set_section_contents
7333965Sjdp#define bfd_elfNN_set_section_contents	_bfd_elf_set_section_contents
7433965Sjdp#endif
7533965Sjdp#define bfd_elfNN_sizeof_headers	_bfd_elf_sizeof_headers
7633965Sjdp#define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents
7760484Sobrien#define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents
7833965Sjdp
7933965Sjdp#define bfd_elfNN_get_section_contents_in_window \
8033965Sjdp  _bfd_generic_get_section_contents_in_window
8133965Sjdp
8289857Sobrien#ifndef elf_backend_can_refcount
8389857Sobrien#define elf_backend_can_refcount 0
8489857Sobrien#endif
8533965Sjdp#ifndef elf_backend_want_got_plt
8633965Sjdp#define elf_backend_want_got_plt 0
8733965Sjdp#endif
8833965Sjdp#ifndef elf_backend_plt_readonly
8933965Sjdp#define elf_backend_plt_readonly 0
9033965Sjdp#endif
9133965Sjdp#ifndef elf_backend_want_plt_sym
9233965Sjdp#define elf_backend_want_plt_sym 0
9333965Sjdp#endif
9438889Sjdp#ifndef elf_backend_plt_not_loaded
9538889Sjdp#define elf_backend_plt_not_loaded 0
9638889Sjdp#endif
9738889Sjdp#ifndef elf_backend_plt_alignment
9838889Sjdp#define elf_backend_plt_alignment 2
9938889Sjdp#endif
10060484Sobrien#ifndef elf_backend_want_dynbss
10160484Sobrien#define elf_backend_want_dynbss 1
10260484Sobrien#endif
103104834Sobrien#ifndef elf_backend_want_p_paddr_set_to_zero
104104834Sobrien#define elf_backend_want_p_paddr_set_to_zero 0
105104834Sobrien#endif
106218822Sdim#ifndef elf_backend_default_execstack
107218822Sdim#define elf_backend_default_execstack 1
108218822Sdim#endif
10933965Sjdp
11033965Sjdp#define bfd_elfNN_bfd_debug_info_start	bfd_void
11133965Sjdp#define bfd_elfNN_bfd_debug_info_end	bfd_void
11289857Sobrien#define bfd_elfNN_bfd_debug_info_accumulate \
113130561Sobrien  ((void (*) (bfd*, struct bfd_section *)) bfd_void)
11433965Sjdp
11533965Sjdp#ifndef bfd_elfNN_bfd_get_relocated_section_contents
11633965Sjdp#define bfd_elfNN_bfd_get_relocated_section_contents \
117130561Sobrien  bfd_generic_get_relocated_section_contents
11833965Sjdp#endif
11933965Sjdp
12033965Sjdp#ifndef bfd_elfNN_bfd_relax_section
12133965Sjdp#define bfd_elfNN_bfd_relax_section bfd_generic_relax_section
12233965Sjdp#endif
12333965Sjdp
12460484Sobrien#ifndef elf_backend_can_gc_sections
12560484Sobrien#define elf_backend_can_gc_sections 0
12660484Sobrien#endif
12789857Sobrien#ifndef elf_backend_can_refcount
12889857Sobrien#define elf_backend_can_refcount 0
12989857Sobrien#endif
13089857Sobrien#ifndef elf_backend_want_got_sym
13189857Sobrien#define elf_backend_want_got_sym 1
13289857Sobrien#endif
133218822Sdim#ifndef elf_backend_gc_mark_dynamic_ref
134218822Sdim#define elf_backend_gc_mark_dynamic_ref	bfd_elf_gc_mark_dynamic_ref_symbol
135218822Sdim#endif
13660484Sobrien#ifndef elf_backend_gc_mark_hook
137218822Sdim#define elf_backend_gc_mark_hook	_bfd_elf_gc_mark_hook
13860484Sobrien#endif
139218822Sdim#ifndef elf_backend_gc_mark_extra_sections
140218822Sdim#define elf_backend_gc_mark_extra_sections	NULL
141218822Sdim#endif
14260484Sobrien#ifndef elf_backend_gc_sweep_hook
14360484Sobrien#define elf_backend_gc_sweep_hook	NULL
14460484Sobrien#endif
14560484Sobrien#ifndef bfd_elfNN_bfd_gc_sections
146130561Sobrien#define bfd_elfNN_bfd_gc_sections bfd_elf_gc_sections
14760484Sobrien#endif
14860484Sobrien
14989857Sobrien#ifndef bfd_elfNN_bfd_merge_sections
15089857Sobrien#define bfd_elfNN_bfd_merge_sections \
15189857Sobrien  _bfd_elf_merge_sections
15289857Sobrien#endif
15389857Sobrien
154218822Sdim#ifndef bfd_elfNN_bfd_is_group_section
155218822Sdim#define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
156218822Sdim#endif
157218822Sdim
158104834Sobrien#ifndef bfd_elfNN_bfd_discard_group
159218822Sdim#define bfd_elfNN_bfd_discard_group bfd_generic_discard_group
160104834Sobrien#endif
161104834Sobrien
162218822Sdim#ifndef bfd_elfNN_section_already_linked
163218822Sdim#define bfd_elfNN_section_already_linked \
164218822Sdim  _bfd_elf_section_already_linked
165218822Sdim#endif
166218822Sdim
16778828Sobrien#ifndef bfd_elfNN_bfd_make_debug_symbol
16833965Sjdp#define bfd_elfNN_bfd_make_debug_symbol \
169130561Sobrien  ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
17078828Sobrien#endif
17133965Sjdp
17233965Sjdp#ifndef bfd_elfNN_bfd_copy_private_symbol_data
17333965Sjdp#define bfd_elfNN_bfd_copy_private_symbol_data \
17433965Sjdp  _bfd_elf_copy_private_symbol_data
17533965Sjdp#endif
17633965Sjdp
17733965Sjdp#ifndef bfd_elfNN_bfd_copy_private_section_data
17833965Sjdp#define bfd_elfNN_bfd_copy_private_section_data \
17933965Sjdp  _bfd_elf_copy_private_section_data
18033965Sjdp#endif
181218822Sdim#ifndef bfd_elfNN_bfd_copy_private_header_data
182218822Sdim#define bfd_elfNN_bfd_copy_private_header_data \
183218822Sdim  _bfd_elf_copy_private_header_data
184218822Sdim#endif
18533965Sjdp#ifndef bfd_elfNN_bfd_copy_private_bfd_data
18633965Sjdp#define bfd_elfNN_bfd_copy_private_bfd_data \
18789857Sobrien  _bfd_elf_copy_private_bfd_data
18833965Sjdp#endif
18933965Sjdp#ifndef bfd_elfNN_bfd_print_private_bfd_data
19033965Sjdp#define bfd_elfNN_bfd_print_private_bfd_data \
19133965Sjdp  _bfd_elf_print_private_bfd_data
19233965Sjdp#endif
19333965Sjdp#ifndef bfd_elfNN_bfd_merge_private_bfd_data
19433965Sjdp#define bfd_elfNN_bfd_merge_private_bfd_data \
195130561Sobrien  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
19633965Sjdp#endif
19733965Sjdp#ifndef bfd_elfNN_bfd_set_private_flags
19833965Sjdp#define bfd_elfNN_bfd_set_private_flags \
199130561Sobrien  ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
20033965Sjdp#endif
20133965Sjdp#ifndef bfd_elfNN_bfd_is_local_label_name
20233965Sjdp#define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
20333965Sjdp#endif
204218822Sdim#ifndef bfd_elfNN_bfd_is_target_special_symbol
205218822Sdim#define bfd_elfNN_bfd_is_target_special_symbol \
206218822Sdim  ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
207218822Sdim#endif
20833965Sjdp
20933965Sjdp#ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
21033965Sjdp#define bfd_elfNN_get_dynamic_reloc_upper_bound \
21133965Sjdp  _bfd_elf_get_dynamic_reloc_upper_bound
21233965Sjdp#endif
21333965Sjdp#ifndef bfd_elfNN_canonicalize_dynamic_reloc
21433965Sjdp#define bfd_elfNN_canonicalize_dynamic_reloc \
21533965Sjdp  _bfd_elf_canonicalize_dynamic_reloc
21633965Sjdp#endif
21733965Sjdp
218104834Sobrien#ifndef bfd_elfNN_bfd_link_hash_table_free
219104834Sobrien#define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
220104834Sobrien#endif
221104834Sobrien
22233965Sjdp#ifdef elf_backend_relocate_section
22333965Sjdp#ifndef bfd_elfNN_bfd_link_hash_table_create
22433965Sjdp#define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
22533965Sjdp#endif
226130561Sobrien#ifndef bfd_elfNN_bfd_link_add_symbols
227130561Sobrien#define bfd_elfNN_bfd_link_add_symbols	bfd_elf_link_add_symbols
228130561Sobrien#endif
229130561Sobrien#ifndef bfd_elfNN_bfd_final_link
230130561Sobrien#define bfd_elfNN_bfd_final_link	bfd_elf_final_link
231130561Sobrien#endif
23233965Sjdp#else /* ! defined (elf_backend_relocate_section) */
23389857Sobrien/* If no backend relocate_section routine, use the generic linker.
23489857Sobrien   Note - this will prevent the port from being able to use some of
23589857Sobrien   the other features of the ELF linker, because the generic hash structure
23689857Sobrien   does not have the fields needed by the ELF linker.  In particular it
23789857Sobrien   means that linking directly to S-records will not work.  */
23833965Sjdp#ifndef bfd_elfNN_bfd_link_hash_table_create
23933965Sjdp#define bfd_elfNN_bfd_link_hash_table_create \
24033965Sjdp  _bfd_generic_link_hash_table_create
24133965Sjdp#endif
24233965Sjdp#ifndef bfd_elfNN_bfd_link_add_symbols
24333965Sjdp#define bfd_elfNN_bfd_link_add_symbols	_bfd_generic_link_add_symbols
24433965Sjdp#endif
24533965Sjdp#ifndef bfd_elfNN_bfd_final_link
24633965Sjdp#define bfd_elfNN_bfd_final_link	_bfd_generic_final_link
24733965Sjdp#endif
24833965Sjdp#endif /* ! defined (elf_backend_relocate_section) */
249104834Sobrien
250104834Sobrien#ifndef bfd_elfNN_bfd_link_just_syms
251104834Sobrien#define bfd_elfNN_bfd_link_just_syms	_bfd_elf_link_just_syms
252104834Sobrien#endif
253104834Sobrien
25433965Sjdp#ifndef bfd_elfNN_bfd_link_split_section
25533965Sjdp#define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
25633965Sjdp#endif
25733965Sjdp
25833965Sjdp#ifndef bfd_elfNN_archive_p
25933965Sjdp#define bfd_elfNN_archive_p bfd_generic_archive_p
26033965Sjdp#endif
26133965Sjdp
26233965Sjdp#ifndef bfd_elfNN_write_archive_contents
26333965Sjdp#define bfd_elfNN_write_archive_contents _bfd_write_archive_contents
26433965Sjdp#endif
26533965Sjdp
26633965Sjdp#ifndef bfd_elfNN_mkobject
26733965Sjdp#define bfd_elfNN_mkobject bfd_elf_mkobject
26833965Sjdp#endif
26933965Sjdp
27060484Sobrien#ifndef bfd_elfNN_mkcorefile
27160484Sobrien#define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
27260484Sobrien#endif
27360484Sobrien
27433965Sjdp#ifndef bfd_elfNN_mkarchive
27533965Sjdp#define bfd_elfNN_mkarchive _bfd_generic_mkarchive
27633965Sjdp#endif
27733965Sjdp
278130561Sobrien#ifndef bfd_elfNN_print_symbol
279130561Sobrien#define bfd_elfNN_print_symbol bfd_elf_print_symbol
280130561Sobrien#endif
281130561Sobrien
28233965Sjdp#ifndef elf_symbol_leading_char
28333965Sjdp#define elf_symbol_leading_char 0
28433965Sjdp#endif
28533965Sjdp
28633965Sjdp#ifndef elf_info_to_howto
28733965Sjdp#define elf_info_to_howto 0
28833965Sjdp#endif
28933965Sjdp
29033965Sjdp#ifndef elf_info_to_howto_rel
29133965Sjdp#define elf_info_to_howto_rel 0
29233965Sjdp#endif
29333965Sjdp
294218822Sdim#ifndef ELF_OSABI
295218822Sdim#define ELF_OSABI ELFOSABI_NONE
296218822Sdim#endif
297218822Sdim
29833965Sjdp#ifndef ELF_MAXPAGESIZE
29960484Sobrien  #error ELF_MAXPAGESIZE is not defined
30033965Sjdp#define ELF_MAXPAGESIZE 1
30133965Sjdp#endif
30233965Sjdp
303218822Sdim#ifndef ELF_MINPAGESIZE
304218822Sdim#define ELF_MINPAGESIZE ELF_MAXPAGESIZE
305218822Sdim#endif
306218822Sdim
307218822Sdim#ifndef ELF_COMMONPAGESIZE
308218822Sdim#define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE
309218822Sdim#endif
310218822Sdim
311218822Sdim#ifndef ELF_DYNAMIC_SEC_FLAGS
312218822Sdim/* Note that we set the SEC_IN_MEMORY flag for these sections.  */
313218822Sdim#define ELF_DYNAMIC_SEC_FLAGS			\
314218822Sdim  (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS	\
315218822Sdim   | SEC_IN_MEMORY | SEC_LINKER_CREATED)
316218822Sdim#endif
317218822Sdim
31833965Sjdp#ifndef elf_backend_collect
319130561Sobrien#define elf_backend_collect FALSE
32033965Sjdp#endif
32133965Sjdp#ifndef elf_backend_type_change_ok
322130561Sobrien#define elf_backend_type_change_ok FALSE
32333965Sjdp#endif
32433965Sjdp
32533965Sjdp#ifndef elf_backend_sym_is_global
32633965Sjdp#define elf_backend_sym_is_global	0
32733965Sjdp#endif
32833965Sjdp#ifndef elf_backend_object_p
32933965Sjdp#define elf_backend_object_p		0
33033965Sjdp#endif
33133965Sjdp#ifndef elf_backend_symbol_processing
33233965Sjdp#define elf_backend_symbol_processing	0
33333965Sjdp#endif
33433965Sjdp#ifndef elf_backend_symbol_table_processing
33533965Sjdp#define elf_backend_symbol_table_processing	0
33633965Sjdp#endif
33760484Sobrien#ifndef elf_backend_get_symbol_type
33860484Sobrien#define elf_backend_get_symbol_type 0
33960484Sobrien#endif
340218822Sdim#ifndef elf_backend_archive_symbol_lookup
341218822Sdim#define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup
342218822Sdim#endif
343130561Sobrien#ifndef elf_backend_name_local_section_symbols
344130561Sobrien#define elf_backend_name_local_section_symbols	0
345130561Sobrien#endif
34633965Sjdp#ifndef elf_backend_section_processing
34733965Sjdp#define elf_backend_section_processing	0
34833965Sjdp#endif
34933965Sjdp#ifndef elf_backend_section_from_shdr
350218822Sdim#define elf_backend_section_from_shdr	_bfd_elf_make_section_from_shdr
35133965Sjdp#endif
35277298Sobrien#ifndef elf_backend_section_flags
35377298Sobrien#define elf_backend_section_flags	0
35477298Sobrien#endif
355218822Sdim#ifndef elf_backend_get_sec_type_attr
356218822Sdim#define elf_backend_get_sec_type_attr	_bfd_elf_get_sec_type_attr
357218822Sdim#endif
35860484Sobrien#ifndef elf_backend_section_from_phdr
359218822Sdim#define elf_backend_section_from_phdr	_bfd_elf_make_section_from_phdr
36060484Sobrien#endif
36133965Sjdp#ifndef elf_backend_fake_sections
36233965Sjdp#define elf_backend_fake_sections	0
36333965Sjdp#endif
36433965Sjdp#ifndef elf_backend_section_from_bfd_section
36533965Sjdp#define elf_backend_section_from_bfd_section	0
36633965Sjdp#endif
36733965Sjdp#ifndef elf_backend_add_symbol_hook
36833965Sjdp#define elf_backend_add_symbol_hook	0
36933965Sjdp#endif
37033965Sjdp#ifndef elf_backend_link_output_symbol_hook
37133965Sjdp#define elf_backend_link_output_symbol_hook 0
37233965Sjdp#endif
37333965Sjdp#ifndef elf_backend_create_dynamic_sections
37433965Sjdp#define elf_backend_create_dynamic_sections 0
37533965Sjdp#endif
376218822Sdim#ifndef elf_backend_omit_section_dynsym
377218822Sdim#define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym
378218822Sdim#endif
379218822Sdim#ifndef elf_backend_relocs_compatible
380218822Sdim#define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible
381218822Sdim#endif
38233965Sjdp#ifndef elf_backend_check_relocs
38333965Sjdp#define elf_backend_check_relocs	0
38433965Sjdp#endif
385218822Sdim#ifndef elf_backend_check_directives
386218822Sdim#define elf_backend_check_directives	0
387218822Sdim#endif
388218822Sdim#ifndef elf_backend_as_needed_cleanup
389218822Sdim#define elf_backend_as_needed_cleanup	0
390218822Sdim#endif
39133965Sjdp#ifndef elf_backend_adjust_dynamic_symbol
39233965Sjdp#define elf_backend_adjust_dynamic_symbol 0
39333965Sjdp#endif
39433965Sjdp#ifndef elf_backend_always_size_sections
39533965Sjdp#define elf_backend_always_size_sections 0
39633965Sjdp#endif
39733965Sjdp#ifndef elf_backend_size_dynamic_sections
39833965Sjdp#define elf_backend_size_dynamic_sections 0
39933965Sjdp#endif
400218822Sdim#ifndef elf_backend_init_index_section
401218822Sdim#define elf_backend_init_index_section \
402218822Sdim ((void (*) (bfd *, struct bfd_link_info *)) bfd_void)
403218822Sdim#endif
40433965Sjdp#ifndef elf_backend_relocate_section
40533965Sjdp#define elf_backend_relocate_section	0
40633965Sjdp#endif
40733965Sjdp#ifndef elf_backend_finish_dynamic_symbol
40833965Sjdp#define elf_backend_finish_dynamic_symbol	0
40933965Sjdp#endif
41033965Sjdp#ifndef elf_backend_finish_dynamic_sections
41133965Sjdp#define elf_backend_finish_dynamic_sections	0
41233965Sjdp#endif
41333965Sjdp#ifndef elf_backend_begin_write_processing
41433965Sjdp#define elf_backend_begin_write_processing	0
41533965Sjdp#endif
41633965Sjdp#ifndef elf_backend_final_write_processing
41733965Sjdp#define elf_backend_final_write_processing	0
41833965Sjdp#endif
41933965Sjdp#ifndef elf_backend_additional_program_headers
42033965Sjdp#define elf_backend_additional_program_headers	0
42133965Sjdp#endif
42233965Sjdp#ifndef elf_backend_modify_segment_map
42333965Sjdp#define elf_backend_modify_segment_map	0
42433965Sjdp#endif
425218822Sdim#ifndef elf_backend_modify_program_headers
426218822Sdim#define elf_backend_modify_program_headers	0
427218822Sdim#endif
42833965Sjdp#ifndef elf_backend_ecoff_debug_swap
42933965Sjdp#define elf_backend_ecoff_debug_swap	0
43033965Sjdp#endif
431130561Sobrien#ifndef elf_backend_bfd_from_remote_memory
432130561Sobrien#define elf_backend_bfd_from_remote_memory _bfd_elfNN_bfd_from_remote_memory
433130561Sobrien#endif
43460484Sobrien#ifndef elf_backend_got_header_size
43560484Sobrien#define elf_backend_got_header_size	0
43660484Sobrien#endif
437218822Sdim#ifndef elf_backend_obj_attrs_vendor
438218822Sdim#define elf_backend_obj_attrs_vendor		NULL
439218822Sdim#endif
440218822Sdim#ifndef elf_backend_obj_attrs_section
441218822Sdim#define elf_backend_obj_attrs_section		NULL
442218822Sdim#endif
443218822Sdim#ifndef elf_backend_obj_attrs_arg_type
444218822Sdim#define elf_backend_obj_attrs_arg_type		NULL
445218822Sdim#endif
446218822Sdim#ifndef elf_backend_obj_attrs_section_type
447218822Sdim#define elf_backend_obj_attrs_section_type		SHT_GNU_ATTRIBUTES
448218822Sdim#endif
44960484Sobrien#ifndef elf_backend_post_process_headers
45060484Sobrien#define elf_backend_post_process_headers	NULL
45160484Sobrien#endif
45260484Sobrien#ifndef elf_backend_print_symbol_all
45360484Sobrien#define elf_backend_print_symbol_all		NULL
45460484Sobrien#endif
455218822Sdim#ifndef elf_backend_output_arch_local_syms
456218822Sdim#define elf_backend_output_arch_local_syms	NULL
457218822Sdim#endif
45860484Sobrien#ifndef elf_backend_output_arch_syms
45960484Sobrien#define elf_backend_output_arch_syms		NULL
46060484Sobrien#endif
46160484Sobrien#ifndef elf_backend_copy_indirect_symbol
46260484Sobrien#define elf_backend_copy_indirect_symbol  _bfd_elf_link_hash_copy_indirect
46360484Sobrien#endif
46460484Sobrien#ifndef elf_backend_hide_symbol
46560484Sobrien#define elf_backend_hide_symbol		_bfd_elf_link_hash_hide_symbol
46660484Sobrien#endif
467218822Sdim#ifndef elf_backend_fixup_symbol
468218822Sdim#define elf_backend_fixup_symbol		NULL
469218822Sdim#endif
470130561Sobrien#ifndef elf_backend_merge_symbol_attribute
471130561Sobrien#define elf_backend_merge_symbol_attribute	NULL
472130561Sobrien#endif
473218822Sdim#ifndef elf_backend_ignore_undef_symbol
474218822Sdim#define elf_backend_ignore_undef_symbol		NULL
475218822Sdim#endif
47689857Sobrien#ifndef elf_backend_emit_relocs
477218822Sdim#define elf_backend_emit_relocs			_bfd_elf_link_output_relocs
47889857Sobrien#endif
47989857Sobrien#ifndef elf_backend_count_relocs
48089857Sobrien#define elf_backend_count_relocs		NULL
48189857Sobrien#endif
48289857Sobrien#ifndef elf_backend_grok_prstatus
48389857Sobrien#define elf_backend_grok_prstatus		NULL
48489857Sobrien#endif
48589857Sobrien#ifndef elf_backend_grok_psinfo
48689857Sobrien#define elf_backend_grok_psinfo			NULL
48789857Sobrien#endif
488218822Sdim#ifndef elf_backend_write_core_note
489218822Sdim#define elf_backend_write_core_note		NULL
490218822Sdim#endif
49189857Sobrien#ifndef elf_backend_sprintf_vma
49289857Sobrien#define elf_backend_sprintf_vma			_bfd_elf_sprintf_vma
49389857Sobrien#endif
49489857Sobrien#ifndef elf_backend_fprintf_vma
49589857Sobrien#define elf_backend_fprintf_vma			_bfd_elf_fprintf_vma
49689857Sobrien#endif
49789857Sobrien#ifndef elf_backend_reloc_type_class
49889857Sobrien#define elf_backend_reloc_type_class		_bfd_elf_reloc_type_class
49989857Sobrien#endif
50089857Sobrien#ifndef elf_backend_discard_info
50189857Sobrien#define elf_backend_discard_info		NULL
50289857Sobrien#endif
50389857Sobrien#ifndef elf_backend_ignore_discarded_relocs
50489857Sobrien#define elf_backend_ignore_discarded_relocs	NULL
50589857Sobrien#endif
506218822Sdim#ifndef elf_backend_action_discarded
507218822Sdim#define elf_backend_action_discarded _bfd_elf_default_action_discarded
508218822Sdim#endif
509218822Sdim#ifndef elf_backend_eh_frame_address_size
510218822Sdim#define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size
511218822Sdim#endif
512130561Sobrien#ifndef elf_backend_can_make_relative_eh_frame
513130561Sobrien#define elf_backend_can_make_relative_eh_frame	_bfd_elf_can_make_relative
514130561Sobrien#endif
515130561Sobrien#ifndef elf_backend_can_make_lsda_relative_eh_frame
516130561Sobrien#define elf_backend_can_make_lsda_relative_eh_frame	_bfd_elf_can_make_relative
517130561Sobrien#endif
518130561Sobrien#ifndef elf_backend_encode_eh_address
519130561Sobrien#define elf_backend_encode_eh_address		_bfd_elf_encode_eh_address
520130561Sobrien#endif
52189857Sobrien#ifndef elf_backend_write_section
52289857Sobrien#define elf_backend_write_section		NULL
52389857Sobrien#endif
524104834Sobrien#ifndef elf_backend_mips_irix_compat
525104834Sobrien#define elf_backend_mips_irix_compat		NULL
526104834Sobrien#endif
527104834Sobrien#ifndef elf_backend_mips_rtype_to_howto
528104834Sobrien#define elf_backend_mips_rtype_to_howto		NULL
529104834Sobrien#endif
53033965Sjdp
53160484Sobrien/* Previously, backends could only use SHT_REL or SHT_RELA relocation
53260484Sobrien   sections, but not both.  They defined USE_REL to indicate SHT_REL
53360484Sobrien   sections, and left it undefined to indicated SHT_RELA sections.
53460484Sobrien   For backwards compatibility, we still support this usage.  */
53560484Sobrien#ifndef USE_REL
53660484Sobrien#define USE_REL 0
53777298Sobrien#endif
53860484Sobrien
53960484Sobrien/* Use these in new code.  */
54077298Sobrien#ifndef elf_backend_may_use_rel_p
54160484Sobrien#define elf_backend_may_use_rel_p USE_REL
54277298Sobrien#endif
54360484Sobrien#ifndef elf_backend_may_use_rela_p
54460484Sobrien#define elf_backend_may_use_rela_p !USE_REL
54560484Sobrien#endif
54677298Sobrien#ifndef elf_backend_default_use_rela_p
54760484Sobrien#define elf_backend_default_use_rela_p !USE_REL
54860484Sobrien#endif
54960484Sobrien
55099461Sobrien#ifndef elf_backend_rela_normal
55199461Sobrien#define elf_backend_rela_normal 0
55299461Sobrien#endif
55399461Sobrien
554218822Sdim#ifndef elf_backend_plt_sym_val
555218822Sdim#define elf_backend_plt_sym_val NULL
556218822Sdim#endif
557218822Sdim#ifndef elf_backend_relplt_name
558218822Sdim#define elf_backend_relplt_name NULL
559218822Sdim#endif
560218822Sdim
56133965Sjdp#ifndef ELF_MACHINE_ALT1
56233965Sjdp#define ELF_MACHINE_ALT1 0
56333965Sjdp#endif
56433965Sjdp
56533965Sjdp#ifndef ELF_MACHINE_ALT2
56633965Sjdp#define ELF_MACHINE_ALT2 0
56733965Sjdp#endif
56833965Sjdp
56933965Sjdp#ifndef elf_backend_size_info
57033965Sjdp#define elf_backend_size_info _bfd_elfNN_size_info
57133965Sjdp#endif
57233965Sjdp
573130561Sobrien#ifndef elf_backend_special_sections
574130561Sobrien#define elf_backend_special_sections NULL
575130561Sobrien#endif
576130561Sobrien
57760484Sobrien#ifndef elf_backend_sign_extend_vma
57860484Sobrien#define elf_backend_sign_extend_vma 0
57960484Sobrien#endif
58060484Sobrien
581218822Sdim#ifndef elf_backend_link_order_error_handler
582218822Sdim#define elf_backend_link_order_error_handler _bfd_default_error_handler
583218822Sdim#endif
584218822Sdim
585218822Sdim#ifndef elf_backend_common_definition
586218822Sdim#define elf_backend_common_definition _bfd_elf_common_definition
587218822Sdim#endif
588218822Sdim
589218822Sdim#ifndef elf_backend_common_section_index
590218822Sdim#define elf_backend_common_section_index _bfd_elf_common_section_index
591218822Sdim#endif
592218822Sdim
593218822Sdim#ifndef elf_backend_common_section
594218822Sdim#define elf_backend_common_section _bfd_elf_common_section
595218822Sdim#endif
596218822Sdim
597218822Sdim#ifndef elf_backend_merge_symbol
598218822Sdim#define elf_backend_merge_symbol NULL
599218822Sdim#endif
600218822Sdim
601218822Sdim#ifndef elf_backend_hash_symbol
602218822Sdim#define elf_backend_hash_symbol _bfd_elf_hash_symbol
603218822Sdim#endif
604218822Sdim
605218822Sdim#ifndef elf_backend_is_function_type
606218822Sdim#define elf_backend_is_function_type _bfd_elf_is_function_type
607218822Sdim#endif
608218822Sdim
60933965Sjdpextern const struct elf_size_info _bfd_elfNN_size_info;
61033965Sjdp
611218822Sdimstatic struct elf_backend_data elfNN_bed =
61233965Sjdp{
61333965Sjdp  ELF_ARCH,			/* arch */
61433965Sjdp  ELF_MACHINE_CODE,		/* elf_machine_code */
615218822Sdim  ELF_OSABI,			/* elf_osabi  */
61633965Sjdp  ELF_MAXPAGESIZE,		/* maxpagesize */
617218822Sdim  ELF_MINPAGESIZE,		/* minpagesize */
618218822Sdim  ELF_COMMONPAGESIZE,		/* commonpagesize */
619218822Sdim  ELF_DYNAMIC_SEC_FLAGS,	/* dynamic_sec_flags */
62033965Sjdp  elf_info_to_howto,
62133965Sjdp  elf_info_to_howto_rel,
62233965Sjdp  elf_backend_sym_is_global,
62333965Sjdp  elf_backend_object_p,
62433965Sjdp  elf_backend_symbol_processing,
62533965Sjdp  elf_backend_symbol_table_processing,
62660484Sobrien  elf_backend_get_symbol_type,
627218822Sdim  elf_backend_archive_symbol_lookup,
628130561Sobrien  elf_backend_name_local_section_symbols,
62933965Sjdp  elf_backend_section_processing,
63033965Sjdp  elf_backend_section_from_shdr,
63177298Sobrien  elf_backend_section_flags,
632218822Sdim  elf_backend_get_sec_type_attr,
63360484Sobrien  elf_backend_section_from_phdr,
63433965Sjdp  elf_backend_fake_sections,
63533965Sjdp  elf_backend_section_from_bfd_section,
63633965Sjdp  elf_backend_add_symbol_hook,
63733965Sjdp  elf_backend_link_output_symbol_hook,
63833965Sjdp  elf_backend_create_dynamic_sections,
639218822Sdim  elf_backend_omit_section_dynsym,
640218822Sdim  elf_backend_relocs_compatible,
64133965Sjdp  elf_backend_check_relocs,
642218822Sdim  elf_backend_check_directives,
643218822Sdim  elf_backend_as_needed_cleanup,
64433965Sjdp  elf_backend_adjust_dynamic_symbol,
64533965Sjdp  elf_backend_always_size_sections,
64633965Sjdp  elf_backend_size_dynamic_sections,
647218822Sdim  elf_backend_init_index_section,
64833965Sjdp  elf_backend_relocate_section,
64933965Sjdp  elf_backend_finish_dynamic_symbol,
65033965Sjdp  elf_backend_finish_dynamic_sections,
65133965Sjdp  elf_backend_begin_write_processing,
65233965Sjdp  elf_backend_final_write_processing,
65333965Sjdp  elf_backend_additional_program_headers,
65433965Sjdp  elf_backend_modify_segment_map,
655218822Sdim  elf_backend_modify_program_headers,
656218822Sdim  elf_backend_gc_mark_dynamic_ref,
65760484Sobrien  elf_backend_gc_mark_hook,
658218822Sdim  elf_backend_gc_mark_extra_sections,
65960484Sobrien  elf_backend_gc_sweep_hook,
66060484Sobrien  elf_backend_post_process_headers,
66160484Sobrien  elf_backend_print_symbol_all,
662218822Sdim  elf_backend_output_arch_local_syms,
66360484Sobrien  elf_backend_output_arch_syms,
66460484Sobrien  elf_backend_copy_indirect_symbol,
66560484Sobrien  elf_backend_hide_symbol,
666218822Sdim  elf_backend_fixup_symbol,
667130561Sobrien  elf_backend_merge_symbol_attribute,
668218822Sdim  elf_backend_ignore_undef_symbol,
66989857Sobrien  elf_backend_emit_relocs,
67089857Sobrien  elf_backend_count_relocs,
67189857Sobrien  elf_backend_grok_prstatus,
67289857Sobrien  elf_backend_grok_psinfo,
673218822Sdim  elf_backend_write_core_note,
67489857Sobrien  elf_backend_sprintf_vma,
67589857Sobrien  elf_backend_fprintf_vma,
67689857Sobrien  elf_backend_reloc_type_class,
67789857Sobrien  elf_backend_discard_info,
67889857Sobrien  elf_backend_ignore_discarded_relocs,
679218822Sdim  elf_backend_action_discarded,
680218822Sdim  elf_backend_eh_frame_address_size,
681130561Sobrien  elf_backend_can_make_relative_eh_frame,
682130561Sobrien  elf_backend_can_make_lsda_relative_eh_frame,
683130561Sobrien  elf_backend_encode_eh_address,
68489857Sobrien  elf_backend_write_section,
685104834Sobrien  elf_backend_mips_irix_compat,
686104834Sobrien  elf_backend_mips_rtype_to_howto,
68733965Sjdp  elf_backend_ecoff_debug_swap,
688130561Sobrien  elf_backend_bfd_from_remote_memory,
689218822Sdim  elf_backend_plt_sym_val,
690218822Sdim  elf_backend_common_definition,
691218822Sdim  elf_backend_common_section_index,
692218822Sdim  elf_backend_common_section,
693218822Sdim  elf_backend_merge_symbol,
694218822Sdim  elf_backend_hash_symbol,
695218822Sdim  elf_backend_is_function_type,
696218822Sdim  elf_backend_link_order_error_handler,
697218822Sdim  elf_backend_relplt_name,
69833965Sjdp  ELF_MACHINE_ALT1,
69933965Sjdp  ELF_MACHINE_ALT2,
70033965Sjdp  &elf_backend_size_info,
701130561Sobrien  elf_backend_special_sections,
70260484Sobrien  elf_backend_got_header_size,
703218822Sdim  elf_backend_obj_attrs_vendor,
704218822Sdim  elf_backend_obj_attrs_section,
705218822Sdim  elf_backend_obj_attrs_arg_type,
706218822Sdim  elf_backend_obj_attrs_section_type,
70760484Sobrien  elf_backend_collect,
70860484Sobrien  elf_backend_type_change_ok,
70960484Sobrien  elf_backend_may_use_rel_p,
71060484Sobrien  elf_backend_may_use_rela_p,
71160484Sobrien  elf_backend_default_use_rela_p,
71299461Sobrien  elf_backend_rela_normal,
71360484Sobrien  elf_backend_sign_extend_vma,
71433965Sjdp  elf_backend_want_got_plt,
71533965Sjdp  elf_backend_plt_readonly,
71638889Sjdp  elf_backend_want_plt_sym,
71738889Sjdp  elf_backend_plt_not_loaded,
71860484Sobrien  elf_backend_plt_alignment,
71960484Sobrien  elf_backend_can_gc_sections,
72089857Sobrien  elf_backend_can_refcount,
72189857Sobrien  elf_backend_want_got_sym,
722104834Sobrien  elf_backend_want_dynbss,
723218822Sdim  elf_backend_want_p_paddr_set_to_zero,
724218822Sdim  elf_backend_default_execstack
72533965Sjdp};
72633965Sjdp
72760484Sobrien/* Forward declaration for use when initialising alternative_target field.  */
72860484Sobrien#ifdef TARGET_LITTLE_SYM
72960484Sobrienextern const bfd_target TARGET_LITTLE_SYM;
73060484Sobrien#endif
73160484Sobrien
73233965Sjdp#ifdef TARGET_BIG_SYM
73333965Sjdpconst bfd_target TARGET_BIG_SYM =
73433965Sjdp{
73533965Sjdp  /* name: identify kind of target */
73633965Sjdp  TARGET_BIG_NAME,
73733965Sjdp
73833965Sjdp  /* flavour: general indication about file */
73933965Sjdp  bfd_target_elf_flavour,
74033965Sjdp
74133965Sjdp  /* byteorder: data is big endian */
74233965Sjdp  BFD_ENDIAN_BIG,
74333965Sjdp
74433965Sjdp  /* header_byteorder: header is also big endian */
74533965Sjdp  BFD_ENDIAN_BIG,
74633965Sjdp
74733965Sjdp  /* object_flags: mask of all file flags */
74889857Sobrien  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
74989857Sobrien   | DYNAMIC | WP_TEXT | D_PAGED),
75033965Sjdp
75133965Sjdp  /* section_flags: mask of all section flags */
75289857Sobrien  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
75389857Sobrien   | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
754218822Sdim   | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
75533965Sjdp
75633965Sjdp   /* leading_symbol_char: is the first char of a user symbol
75733965Sjdp      predictable, and if so what is it */
75833965Sjdp  elf_symbol_leading_char,
75933965Sjdp
76033965Sjdp  /* ar_pad_char: pad character for filenames within an archive header
76133965Sjdp     FIXME:  this really has nothing to do with ELF, this is a characteristic
76233965Sjdp     of the archiver and/or os and should be independently tunable */
76333965Sjdp  '/',
76433965Sjdp
76533965Sjdp  /* ar_max_namelen: maximum number of characters in an archive header
76633965Sjdp     FIXME:  this really has nothing to do with ELF, this is a characteristic
76794536Sobrien     of the archiver and should be independently tunable.  The System V ABI,
76894536Sobrien     Chapter 7 (Formats & Protocols), Archive section sets this as 15.  */
76994536Sobrien  15,
77033965Sjdp
77133965Sjdp  /* Routines to byte-swap various sized integers from the data sections */
77233965Sjdp  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
77333965Sjdp    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
77433965Sjdp    bfd_getb16, bfd_getb_signed_16, bfd_putb16,
77533965Sjdp
77633965Sjdp  /* Routines to byte-swap various sized integers from the file headers */
77733965Sjdp  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
77833965Sjdp    bfd_getb32, bfd_getb_signed_32, bfd_putb32,
77933965Sjdp    bfd_getb16, bfd_getb_signed_16, bfd_putb16,
78033965Sjdp
78133965Sjdp  /* bfd_check_format: check the format of a file being read */
78233965Sjdp  { _bfd_dummy_target,		/* unknown format */
78333965Sjdp    bfd_elfNN_object_p,		/* assembler/linker output (object file) */
78433965Sjdp    bfd_elfNN_archive_p,	/* an archive */
78533965Sjdp    bfd_elfNN_core_file_p	/* a core file */
78633965Sjdp  },
78733965Sjdp
78833965Sjdp  /* bfd_set_format: set the format of a file being written */
78933965Sjdp  { bfd_false,
79033965Sjdp    bfd_elfNN_mkobject,
79133965Sjdp    bfd_elfNN_mkarchive,
79260484Sobrien    bfd_elfNN_mkcorefile
79333965Sjdp  },
79433965Sjdp
79533965Sjdp  /* bfd_write_contents: write cached information into a file being written */
79633965Sjdp  { bfd_false,
79733965Sjdp    bfd_elfNN_write_object_contents,
79833965Sjdp    bfd_elfNN_write_archive_contents,
79960484Sobrien    bfd_elfNN_write_corefile_contents,
80033965Sjdp  },
80133965Sjdp
802130561Sobrien  BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
803130561Sobrien  BFD_JUMP_TABLE_COPY (bfd_elfNN),
804130561Sobrien  BFD_JUMP_TABLE_CORE (bfd_elfNN),
80533965Sjdp#ifdef bfd_elfNN_archive_functions
806130561Sobrien  BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
80733965Sjdp#else
808130561Sobrien  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
80933965Sjdp#endif
810130561Sobrien  BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
811130561Sobrien  BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
812130561Sobrien  BFD_JUMP_TABLE_WRITE (bfd_elfNN),
813130561Sobrien  BFD_JUMP_TABLE_LINK (bfd_elfNN),
814130561Sobrien  BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
81533965Sjdp
81660484Sobrien  /* Alternative endian target.  */
81760484Sobrien#ifdef TARGET_LITTLE_SYM
81860484Sobrien  & TARGET_LITTLE_SYM,
81960484Sobrien#else
82060484Sobrien  NULL,
82160484Sobrien#endif
82260484Sobrien
82333965Sjdp  /* backend_data: */
824130561Sobrien  &elfNN_bed
82533965Sjdp};
82633965Sjdp#endif
82733965Sjdp
82833965Sjdp#ifdef TARGET_LITTLE_SYM
82933965Sjdpconst bfd_target TARGET_LITTLE_SYM =
83033965Sjdp{
83133965Sjdp  /* name: identify kind of target */
83233965Sjdp  TARGET_LITTLE_NAME,
83333965Sjdp
83433965Sjdp  /* flavour: general indication about file */
83533965Sjdp  bfd_target_elf_flavour,
83633965Sjdp
83733965Sjdp  /* byteorder: data is little endian */
83833965Sjdp  BFD_ENDIAN_LITTLE,
83933965Sjdp
84033965Sjdp  /* header_byteorder: header is also little endian */
84133965Sjdp  BFD_ENDIAN_LITTLE,
84233965Sjdp
84333965Sjdp  /* object_flags: mask of all file flags */
84489857Sobrien  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
84589857Sobrien   | DYNAMIC | WP_TEXT | D_PAGED),
84633965Sjdp
84733965Sjdp  /* section_flags: mask of all section flags */
84889857Sobrien  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
84989857Sobrien   | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
850218822Sdim   | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
85133965Sjdp
85233965Sjdp   /* leading_symbol_char: is the first char of a user symbol
85333965Sjdp      predictable, and if so what is it */
85433965Sjdp  elf_symbol_leading_char,
85533965Sjdp
85633965Sjdp  /* ar_pad_char: pad character for filenames within an archive header
85733965Sjdp     FIXME:  this really has nothing to do with ELF, this is a characteristic
85833965Sjdp     of the archiver and/or os and should be independently tunable */
85933965Sjdp  '/',
86033965Sjdp
86133965Sjdp  /* ar_max_namelen: maximum number of characters in an archive header
86233965Sjdp     FIXME:  this really has nothing to do with ELF, this is a characteristic
86394536Sobrien     of the archiver and should be independently tunable.  The System V ABI,
86494536Sobrien     Chapter 7 (Formats & Protocols), Archive section sets this as 15.  */
86594536Sobrien  15,
86633965Sjdp
86733965Sjdp  /* Routines to byte-swap various sized integers from the data sections */
86833965Sjdp  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
86933965Sjdp    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
87033965Sjdp    bfd_getl16, bfd_getl_signed_16, bfd_putl16,
87133965Sjdp
87233965Sjdp  /* Routines to byte-swap various sized integers from the file headers */
87333965Sjdp  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
87433965Sjdp    bfd_getl32, bfd_getl_signed_32, bfd_putl32,
87533965Sjdp    bfd_getl16, bfd_getl_signed_16, bfd_putl16,
87633965Sjdp
87733965Sjdp  /* bfd_check_format: check the format of a file being read */
87833965Sjdp  { _bfd_dummy_target,		/* unknown format */
87933965Sjdp    bfd_elfNN_object_p,		/* assembler/linker output (object file) */
88033965Sjdp    bfd_elfNN_archive_p,	/* an archive */
88133965Sjdp    bfd_elfNN_core_file_p	/* a core file */
88233965Sjdp  },
88333965Sjdp
88433965Sjdp  /* bfd_set_format: set the format of a file being written */
88533965Sjdp  { bfd_false,
88633965Sjdp    bfd_elfNN_mkobject,
88733965Sjdp    bfd_elfNN_mkarchive,
88860484Sobrien    bfd_elfNN_mkcorefile
88933965Sjdp  },
89033965Sjdp
89133965Sjdp  /* bfd_write_contents: write cached information into a file being written */
89233965Sjdp  { bfd_false,
89333965Sjdp    bfd_elfNN_write_object_contents,
89433965Sjdp    bfd_elfNN_write_archive_contents,
89560484Sobrien    bfd_elfNN_write_corefile_contents,
89633965Sjdp  },
89733965Sjdp
898130561Sobrien  BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
899130561Sobrien  BFD_JUMP_TABLE_COPY (bfd_elfNN),
900130561Sobrien  BFD_JUMP_TABLE_CORE (bfd_elfNN),
90133965Sjdp#ifdef bfd_elfNN_archive_functions
902130561Sobrien  BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
90333965Sjdp#else
904130561Sobrien  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
90533965Sjdp#endif
906130561Sobrien  BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
907130561Sobrien  BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
908130561Sobrien  BFD_JUMP_TABLE_WRITE (bfd_elfNN),
909130561Sobrien  BFD_JUMP_TABLE_LINK (bfd_elfNN),
910130561Sobrien  BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
91133965Sjdp
91260484Sobrien  /* Alternative endian target.  */
91360484Sobrien#ifdef TARGET_BIG_SYM
91460484Sobrien  & TARGET_BIG_SYM,
91560484Sobrien#else
91660484Sobrien  NULL,
91760484Sobrien#endif
91877298Sobrien
91933965Sjdp  /* backend_data: */
920130561Sobrien  &elfNN_bed
92133965Sjdp};
92233965Sjdp#endif
923