elfxx-target.h revision 89857
133965Sjdp/* Target definitions for NN-bit ELF 278828Sobrien Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 378828Sobrien Free Software Foundation, Inc. 433965Sjdp 533965SjdpThis file is part of BFD, the Binary File Descriptor library. 633965Sjdp 733965SjdpThis program is free software; you can redistribute it and/or modify 833965Sjdpit under the terms of the GNU General Public License as published by 933965Sjdpthe Free Software Foundation; either version 2 of the License, or 1033965Sjdp(at your option) any later version. 1133965Sjdp 1233965SjdpThis program is distributed in the hope that it will be useful, 1333965Sjdpbut WITHOUT ANY WARRANTY; without even the implied warranty of 1433965SjdpMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1533965SjdpGNU General Public License for more details. 1633965Sjdp 1733965SjdpYou should have received a copy of the GNU General Public License 1833965Sjdpalong with this program; if not, write to the Free Software 1933965SjdpFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 2938889Sjdp#define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup 3033965Sjdp#define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info 3133965Sjdp#ifndef bfd_elfNN_get_section_contents 3233965Sjdp#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents 3333965Sjdp#endif 3433965Sjdp 3533965Sjdp#define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab 3633965Sjdp#define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc 3733965Sjdp#ifndef bfd_elfNN_find_nearest_line 3833965Sjdp#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line 3933965Sjdp#endif 4033965Sjdp#define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols 4133965Sjdp#define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol 4233965Sjdp#define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound 4333965Sjdp#define bfd_elfNN_get_lineno _bfd_elf_get_lineno 4433965Sjdp#ifndef bfd_elfNN_get_reloc_upper_bound 4533965Sjdp#define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound 4633965Sjdp#endif 4733965Sjdp#define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info 4833965Sjdp#define bfd_elfNN_get_symtab _bfd_elf_get_symtab 4933965Sjdp#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound 5033965Sjdp#if 0 /* done in elf-bfd.h */ 5133965Sjdp#define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol 5233965Sjdp#endif 5333965Sjdp#define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol 5433965Sjdp#define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook 5533965Sjdp#define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach 5633965Sjdp#ifndef bfd_elfNN_set_section_contents 5733965Sjdp#define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents 5833965Sjdp#endif 5933965Sjdp#define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers 6033965Sjdp#define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents 6160484Sobrien#define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents 6233965Sjdp 6333965Sjdp#define bfd_elfNN_get_section_contents_in_window \ 6433965Sjdp _bfd_generic_get_section_contents_in_window 6533965Sjdp 6638889Sjdp#ifndef elf_backend_got_symbol_offset 6738889Sjdp#define elf_backend_got_symbol_offset (bfd_vma) 0 6838889Sjdp#endif 6989857Sobrien#ifndef elf_backend_can_refcount 7089857Sobrien#define elf_backend_can_refcount 0 7189857Sobrien#endif 7233965Sjdp#ifndef elf_backend_want_got_plt 7333965Sjdp#define elf_backend_want_got_plt 0 7433965Sjdp#endif 7533965Sjdp#ifndef elf_backend_plt_readonly 7633965Sjdp#define elf_backend_plt_readonly 0 7733965Sjdp#endif 7833965Sjdp#ifndef elf_backend_want_plt_sym 7933965Sjdp#define elf_backend_want_plt_sym 0 8033965Sjdp#endif 8138889Sjdp#ifndef elf_backend_plt_not_loaded 8238889Sjdp#define elf_backend_plt_not_loaded 0 8338889Sjdp#endif 8438889Sjdp#ifndef elf_backend_plt_alignment 8538889Sjdp#define elf_backend_plt_alignment 2 8638889Sjdp#endif 8760484Sobrien#ifndef elf_backend_want_dynbss 8860484Sobrien#define elf_backend_want_dynbss 1 8960484Sobrien#endif 9033965Sjdp 9133965Sjdp#define bfd_elfNN_bfd_debug_info_start bfd_void 9233965Sjdp#define bfd_elfNN_bfd_debug_info_end bfd_void 9389857Sobrien#define bfd_elfNN_bfd_debug_info_accumulate \ 9489857Sobrien (void (*) PARAMS ((bfd*, struct sec *))) bfd_void 9533965Sjdp 9633965Sjdp#ifndef bfd_elfNN_bfd_get_relocated_section_contents 9733965Sjdp#define bfd_elfNN_bfd_get_relocated_section_contents \ 9833965Sjdp bfd_generic_get_relocated_section_contents 9933965Sjdp#endif 10033965Sjdp 10133965Sjdp#ifndef bfd_elfNN_bfd_relax_section 10233965Sjdp#define bfd_elfNN_bfd_relax_section bfd_generic_relax_section 10333965Sjdp#endif 10433965Sjdp 10560484Sobrien#ifndef elf_backend_can_gc_sections 10660484Sobrien#define elf_backend_can_gc_sections 0 10760484Sobrien#endif 10889857Sobrien#ifndef elf_backend_can_refcount 10989857Sobrien#define elf_backend_can_refcount 0 11089857Sobrien#endif 11189857Sobrien#ifndef elf_backend_want_got_sym 11289857Sobrien#define elf_backend_want_got_sym 1 11389857Sobrien#endif 11460484Sobrien#ifndef elf_backend_gc_mark_hook 11560484Sobrien#define elf_backend_gc_mark_hook NULL 11660484Sobrien#endif 11760484Sobrien#ifndef elf_backend_gc_sweep_hook 11860484Sobrien#define elf_backend_gc_sweep_hook NULL 11960484Sobrien#endif 12060484Sobrien#ifndef bfd_elfNN_bfd_gc_sections 12160484Sobrien#define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections 12260484Sobrien#endif 12360484Sobrien 12489857Sobrien#ifndef bfd_elfNN_bfd_merge_sections 12589857Sobrien#define bfd_elfNN_bfd_merge_sections \ 12689857Sobrien _bfd_elf_merge_sections 12789857Sobrien#endif 12889857Sobrien 12978828Sobrien#ifndef bfd_elfNN_bfd_make_debug_symbol 13033965Sjdp#define bfd_elfNN_bfd_make_debug_symbol \ 13133965Sjdp ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) 13278828Sobrien#endif 13333965Sjdp 13433965Sjdp#ifndef bfd_elfNN_bfd_copy_private_symbol_data 13533965Sjdp#define bfd_elfNN_bfd_copy_private_symbol_data \ 13633965Sjdp _bfd_elf_copy_private_symbol_data 13733965Sjdp#endif 13833965Sjdp 13933965Sjdp#ifndef bfd_elfNN_bfd_copy_private_section_data 14033965Sjdp#define bfd_elfNN_bfd_copy_private_section_data \ 14133965Sjdp _bfd_elf_copy_private_section_data 14233965Sjdp#endif 14333965Sjdp#ifndef bfd_elfNN_bfd_copy_private_bfd_data 14433965Sjdp#define bfd_elfNN_bfd_copy_private_bfd_data \ 14589857Sobrien _bfd_elf_copy_private_bfd_data 14633965Sjdp#endif 14733965Sjdp#ifndef bfd_elfNN_bfd_print_private_bfd_data 14833965Sjdp#define bfd_elfNN_bfd_print_private_bfd_data \ 14933965Sjdp _bfd_elf_print_private_bfd_data 15033965Sjdp#endif 15133965Sjdp#ifndef bfd_elfNN_bfd_merge_private_bfd_data 15233965Sjdp#define bfd_elfNN_bfd_merge_private_bfd_data \ 15333965Sjdp ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) 15433965Sjdp#endif 15533965Sjdp#ifndef bfd_elfNN_bfd_set_private_flags 15633965Sjdp#define bfd_elfNN_bfd_set_private_flags \ 15733965Sjdp ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true) 15833965Sjdp#endif 15933965Sjdp#ifndef bfd_elfNN_bfd_is_local_label_name 16033965Sjdp#define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name 16133965Sjdp#endif 16233965Sjdp 16333965Sjdp#ifndef bfd_elfNN_get_dynamic_reloc_upper_bound 16433965Sjdp#define bfd_elfNN_get_dynamic_reloc_upper_bound \ 16533965Sjdp _bfd_elf_get_dynamic_reloc_upper_bound 16633965Sjdp#endif 16733965Sjdp#ifndef bfd_elfNN_canonicalize_dynamic_reloc 16833965Sjdp#define bfd_elfNN_canonicalize_dynamic_reloc \ 16933965Sjdp _bfd_elf_canonicalize_dynamic_reloc 17033965Sjdp#endif 17133965Sjdp 17233965Sjdp#ifdef elf_backend_relocate_section 17333965Sjdp#ifndef bfd_elfNN_bfd_link_hash_table_create 17433965Sjdp#define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create 17533965Sjdp#endif 17633965Sjdp#else /* ! defined (elf_backend_relocate_section) */ 17789857Sobrien/* If no backend relocate_section routine, use the generic linker. 17889857Sobrien Note - this will prevent the port from being able to use some of 17989857Sobrien the other features of the ELF linker, because the generic hash structure 18089857Sobrien does not have the fields needed by the ELF linker. In particular it 18189857Sobrien means that linking directly to S-records will not work. */ 18233965Sjdp#ifndef bfd_elfNN_bfd_link_hash_table_create 18333965Sjdp#define bfd_elfNN_bfd_link_hash_table_create \ 18433965Sjdp _bfd_generic_link_hash_table_create 18533965Sjdp#endif 18633965Sjdp#ifndef bfd_elfNN_bfd_link_add_symbols 18733965Sjdp#define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols 18833965Sjdp#endif 18933965Sjdp#ifndef bfd_elfNN_bfd_final_link 19033965Sjdp#define bfd_elfNN_bfd_final_link _bfd_generic_final_link 19133965Sjdp#endif 19233965Sjdp#endif /* ! defined (elf_backend_relocate_section) */ 19333965Sjdp#ifndef bfd_elfNN_bfd_link_split_section 19433965Sjdp#define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section 19533965Sjdp#endif 19633965Sjdp 19733965Sjdp#ifndef bfd_elfNN_archive_p 19833965Sjdp#define bfd_elfNN_archive_p bfd_generic_archive_p 19933965Sjdp#endif 20033965Sjdp 20133965Sjdp#ifndef bfd_elfNN_write_archive_contents 20233965Sjdp#define bfd_elfNN_write_archive_contents _bfd_write_archive_contents 20333965Sjdp#endif 20433965Sjdp 20533965Sjdp#ifndef bfd_elfNN_mkobject 20633965Sjdp#define bfd_elfNN_mkobject bfd_elf_mkobject 20733965Sjdp#endif 20833965Sjdp 20960484Sobrien#ifndef bfd_elfNN_mkcorefile 21060484Sobrien#define bfd_elfNN_mkcorefile bfd_elf_mkcorefile 21160484Sobrien#endif 21260484Sobrien 21333965Sjdp#ifndef bfd_elfNN_mkarchive 21433965Sjdp#define bfd_elfNN_mkarchive _bfd_generic_mkarchive 21533965Sjdp#endif 21633965Sjdp 21733965Sjdp#ifndef elf_symbol_leading_char 21833965Sjdp#define elf_symbol_leading_char 0 21933965Sjdp#endif 22033965Sjdp 22133965Sjdp#ifndef elf_info_to_howto 22233965Sjdp#define elf_info_to_howto 0 22333965Sjdp#endif 22433965Sjdp 22533965Sjdp#ifndef elf_info_to_howto_rel 22633965Sjdp#define elf_info_to_howto_rel 0 22733965Sjdp#endif 22833965Sjdp 22933965Sjdp#ifndef ELF_MAXPAGESIZE 23060484Sobrien #error ELF_MAXPAGESIZE is not defined 23133965Sjdp#define ELF_MAXPAGESIZE 1 23233965Sjdp#endif 23333965Sjdp 23433965Sjdp#ifndef elf_backend_collect 23533965Sjdp#define elf_backend_collect false 23633965Sjdp#endif 23733965Sjdp#ifndef elf_backend_type_change_ok 23833965Sjdp#define elf_backend_type_change_ok false 23933965Sjdp#endif 24033965Sjdp 24133965Sjdp#ifndef elf_backend_sym_is_global 24233965Sjdp#define elf_backend_sym_is_global 0 24333965Sjdp#endif 24433965Sjdp#ifndef elf_backend_object_p 24533965Sjdp#define elf_backend_object_p 0 24633965Sjdp#endif 24733965Sjdp#ifndef elf_backend_symbol_processing 24833965Sjdp#define elf_backend_symbol_processing 0 24933965Sjdp#endif 25033965Sjdp#ifndef elf_backend_symbol_table_processing 25133965Sjdp#define elf_backend_symbol_table_processing 0 25233965Sjdp#endif 25360484Sobrien#ifndef elf_backend_get_symbol_type 25460484Sobrien#define elf_backend_get_symbol_type 0 25560484Sobrien#endif 25633965Sjdp#ifndef elf_backend_section_processing 25733965Sjdp#define elf_backend_section_processing 0 25833965Sjdp#endif 25933965Sjdp#ifndef elf_backend_section_from_shdr 26033965Sjdp#define elf_backend_section_from_shdr 0 26133965Sjdp#endif 26277298Sobrien#ifndef elf_backend_section_flags 26377298Sobrien#define elf_backend_section_flags 0 26477298Sobrien#endif 26560484Sobrien#ifndef elf_backend_section_from_phdr 26660484Sobrien#define elf_backend_section_from_phdr 0 26760484Sobrien#endif 26833965Sjdp#ifndef elf_backend_fake_sections 26933965Sjdp#define elf_backend_fake_sections 0 27033965Sjdp#endif 27133965Sjdp#ifndef elf_backend_section_from_bfd_section 27233965Sjdp#define elf_backend_section_from_bfd_section 0 27333965Sjdp#endif 27433965Sjdp#ifndef elf_backend_add_symbol_hook 27533965Sjdp#define elf_backend_add_symbol_hook 0 27633965Sjdp#endif 27733965Sjdp#ifndef elf_backend_link_output_symbol_hook 27833965Sjdp#define elf_backend_link_output_symbol_hook 0 27933965Sjdp#endif 28033965Sjdp#ifndef elf_backend_create_dynamic_sections 28133965Sjdp#define elf_backend_create_dynamic_sections 0 28233965Sjdp#endif 28333965Sjdp#ifndef elf_backend_check_relocs 28433965Sjdp#define elf_backend_check_relocs 0 28533965Sjdp#endif 28633965Sjdp#ifndef elf_backend_adjust_dynamic_symbol 28733965Sjdp#define elf_backend_adjust_dynamic_symbol 0 28833965Sjdp#endif 28933965Sjdp#ifndef elf_backend_always_size_sections 29033965Sjdp#define elf_backend_always_size_sections 0 29133965Sjdp#endif 29233965Sjdp#ifndef elf_backend_size_dynamic_sections 29333965Sjdp#define elf_backend_size_dynamic_sections 0 29433965Sjdp#endif 29533965Sjdp#ifndef elf_backend_relocate_section 29633965Sjdp#define elf_backend_relocate_section 0 29733965Sjdp#endif 29833965Sjdp#ifndef elf_backend_finish_dynamic_symbol 29933965Sjdp#define elf_backend_finish_dynamic_symbol 0 30033965Sjdp#endif 30133965Sjdp#ifndef elf_backend_finish_dynamic_sections 30233965Sjdp#define elf_backend_finish_dynamic_sections 0 30333965Sjdp#endif 30433965Sjdp#ifndef elf_backend_begin_write_processing 30533965Sjdp#define elf_backend_begin_write_processing 0 30633965Sjdp#endif 30733965Sjdp#ifndef elf_backend_final_write_processing 30833965Sjdp#define elf_backend_final_write_processing 0 30933965Sjdp#endif 31033965Sjdp#ifndef elf_backend_additional_program_headers 31133965Sjdp#define elf_backend_additional_program_headers 0 31233965Sjdp#endif 31333965Sjdp#ifndef elf_backend_modify_segment_map 31433965Sjdp#define elf_backend_modify_segment_map 0 31533965Sjdp#endif 31633965Sjdp#ifndef elf_backend_ecoff_debug_swap 31733965Sjdp#define elf_backend_ecoff_debug_swap 0 31833965Sjdp#endif 31960484Sobrien#ifndef elf_backend_got_header_size 32060484Sobrien#define elf_backend_got_header_size 0 32160484Sobrien#endif 32260484Sobrien#ifndef elf_backend_plt_header_size 32360484Sobrien#define elf_backend_plt_header_size 0 32460484Sobrien#endif 32560484Sobrien#ifndef elf_backend_post_process_headers 32660484Sobrien#define elf_backend_post_process_headers NULL 32760484Sobrien#endif 32860484Sobrien#ifndef elf_backend_print_symbol_all 32960484Sobrien#define elf_backend_print_symbol_all NULL 33060484Sobrien#endif 33160484Sobrien#ifndef elf_backend_output_arch_syms 33260484Sobrien#define elf_backend_output_arch_syms NULL 33360484Sobrien#endif 33460484Sobrien#ifndef elf_backend_copy_indirect_symbol 33560484Sobrien#define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect 33660484Sobrien#endif 33760484Sobrien#ifndef elf_backend_hide_symbol 33860484Sobrien#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol 33960484Sobrien#endif 34089857Sobrien#ifndef elf_backend_emit_relocs 34189857Sobrien#define elf_backend_emit_relocs NULL 34289857Sobrien#endif 34389857Sobrien#ifndef elf_backend_count_relocs 34489857Sobrien#define elf_backend_count_relocs NULL 34589857Sobrien#endif 34689857Sobrien#ifndef elf_backend_grok_prstatus 34789857Sobrien#define elf_backend_grok_prstatus NULL 34889857Sobrien#endif 34989857Sobrien#ifndef elf_backend_grok_psinfo 35089857Sobrien#define elf_backend_grok_psinfo NULL 35189857Sobrien#endif 35289857Sobrien#ifndef elf_backend_sprintf_vma 35389857Sobrien#define elf_backend_sprintf_vma _bfd_elf_sprintf_vma 35489857Sobrien#endif 35589857Sobrien#ifndef elf_backend_fprintf_vma 35689857Sobrien#define elf_backend_fprintf_vma _bfd_elf_fprintf_vma 35789857Sobrien#endif 35889857Sobrien#ifndef elf_backend_reloc_type_class 35989857Sobrien#define elf_backend_reloc_type_class _bfd_elf_reloc_type_class 36089857Sobrien#endif 36189857Sobrien#ifndef elf_backend_discard_info 36289857Sobrien#define elf_backend_discard_info NULL 36389857Sobrien#endif 36489857Sobrien#ifndef elf_backend_ignore_discarded_relocs 36589857Sobrien#define elf_backend_ignore_discarded_relocs NULL 36689857Sobrien#endif 36789857Sobrien#ifndef elf_backend_write_section 36889857Sobrien#define elf_backend_write_section NULL 36989857Sobrien#endif 37033965Sjdp 37160484Sobrien/* Previously, backends could only use SHT_REL or SHT_RELA relocation 37260484Sobrien sections, but not both. They defined USE_REL to indicate SHT_REL 37360484Sobrien sections, and left it undefined to indicated SHT_RELA sections. 37460484Sobrien For backwards compatibility, we still support this usage. */ 37560484Sobrien#ifndef USE_REL 37660484Sobrien#define USE_REL 0 37760484Sobrien#else 37860484Sobrien#undef USE_REL 37960484Sobrien#define USE_REL 1 38077298Sobrien#endif 38160484Sobrien 38260484Sobrien/* Use these in new code. */ 38377298Sobrien#ifndef elf_backend_may_use_rel_p 38460484Sobrien#define elf_backend_may_use_rel_p USE_REL 38577298Sobrien#endif 38660484Sobrien#ifndef elf_backend_may_use_rela_p 38760484Sobrien#define elf_backend_may_use_rela_p !USE_REL 38860484Sobrien#endif 38977298Sobrien#ifndef elf_backend_default_use_rela_p 39060484Sobrien#define elf_backend_default_use_rela_p !USE_REL 39160484Sobrien#endif 39260484Sobrien 39333965Sjdp#ifndef ELF_MACHINE_ALT1 39433965Sjdp#define ELF_MACHINE_ALT1 0 39533965Sjdp#endif 39633965Sjdp 39733965Sjdp#ifndef ELF_MACHINE_ALT2 39833965Sjdp#define ELF_MACHINE_ALT2 0 39933965Sjdp#endif 40033965Sjdp 40133965Sjdp#ifndef elf_backend_size_info 40233965Sjdp#define elf_backend_size_info _bfd_elfNN_size_info 40333965Sjdp#endif 40433965Sjdp 40560484Sobrien#ifndef elf_backend_sign_extend_vma 40660484Sobrien#define elf_backend_sign_extend_vma 0 40760484Sobrien#endif 40860484Sobrien 40933965Sjdpextern const struct elf_size_info _bfd_elfNN_size_info; 41033965Sjdp 41177298Sobrien#ifndef INCLUDED_TARGET_FILE 41289857Sobrienstatic const struct elf_backend_data elfNN_bed = 41333965Sjdp{ 41433965Sjdp ELF_ARCH, /* arch */ 41533965Sjdp ELF_MACHINE_CODE, /* elf_machine_code */ 41633965Sjdp ELF_MAXPAGESIZE, /* maxpagesize */ 41733965Sjdp elf_info_to_howto, 41833965Sjdp elf_info_to_howto_rel, 41933965Sjdp elf_backend_sym_is_global, 42033965Sjdp elf_backend_object_p, 42133965Sjdp elf_backend_symbol_processing, 42233965Sjdp elf_backend_symbol_table_processing, 42360484Sobrien elf_backend_get_symbol_type, 42433965Sjdp elf_backend_section_processing, 42533965Sjdp elf_backend_section_from_shdr, 42677298Sobrien elf_backend_section_flags, 42760484Sobrien elf_backend_section_from_phdr, 42833965Sjdp elf_backend_fake_sections, 42933965Sjdp elf_backend_section_from_bfd_section, 43033965Sjdp elf_backend_add_symbol_hook, 43133965Sjdp elf_backend_link_output_symbol_hook, 43233965Sjdp elf_backend_create_dynamic_sections, 43333965Sjdp elf_backend_check_relocs, 43433965Sjdp elf_backend_adjust_dynamic_symbol, 43533965Sjdp elf_backend_always_size_sections, 43633965Sjdp elf_backend_size_dynamic_sections, 43733965Sjdp elf_backend_relocate_section, 43833965Sjdp elf_backend_finish_dynamic_symbol, 43933965Sjdp elf_backend_finish_dynamic_sections, 44033965Sjdp elf_backend_begin_write_processing, 44133965Sjdp elf_backend_final_write_processing, 44233965Sjdp elf_backend_additional_program_headers, 44333965Sjdp elf_backend_modify_segment_map, 44460484Sobrien elf_backend_gc_mark_hook, 44560484Sobrien elf_backend_gc_sweep_hook, 44660484Sobrien elf_backend_post_process_headers, 44760484Sobrien elf_backend_print_symbol_all, 44860484Sobrien elf_backend_output_arch_syms, 44960484Sobrien elf_backend_copy_indirect_symbol, 45060484Sobrien elf_backend_hide_symbol, 45189857Sobrien elf_backend_emit_relocs, 45289857Sobrien elf_backend_count_relocs, 45389857Sobrien elf_backend_grok_prstatus, 45489857Sobrien elf_backend_grok_psinfo, 45589857Sobrien elf_backend_sprintf_vma, 45689857Sobrien elf_backend_fprintf_vma, 45789857Sobrien elf_backend_reloc_type_class, 45889857Sobrien elf_backend_discard_info, 45989857Sobrien elf_backend_ignore_discarded_relocs, 46089857Sobrien elf_backend_write_section, 46133965Sjdp elf_backend_ecoff_debug_swap, 46233965Sjdp ELF_MACHINE_ALT1, 46333965Sjdp ELF_MACHINE_ALT2, 46433965Sjdp &elf_backend_size_info, 46538889Sjdp elf_backend_got_symbol_offset, 46660484Sobrien elf_backend_got_header_size, 46760484Sobrien elf_backend_plt_header_size, 46860484Sobrien elf_backend_collect, 46960484Sobrien elf_backend_type_change_ok, 47060484Sobrien elf_backend_may_use_rel_p, 47160484Sobrien elf_backend_may_use_rela_p, 47260484Sobrien elf_backend_default_use_rela_p, 47360484Sobrien elf_backend_sign_extend_vma, 47433965Sjdp elf_backend_want_got_plt, 47533965Sjdp elf_backend_plt_readonly, 47638889Sjdp elf_backend_want_plt_sym, 47738889Sjdp elf_backend_plt_not_loaded, 47860484Sobrien elf_backend_plt_alignment, 47960484Sobrien elf_backend_can_gc_sections, 48089857Sobrien elf_backend_can_refcount, 48189857Sobrien elf_backend_want_got_sym, 48260484Sobrien elf_backend_want_dynbss 48333965Sjdp}; 48477298Sobrien#endif 48533965Sjdp 48660484Sobrien/* Forward declaration for use when initialising alternative_target field. */ 48760484Sobrien#ifdef TARGET_LITTLE_SYM 48860484Sobrienextern const bfd_target TARGET_LITTLE_SYM; 48960484Sobrien#endif 49060484Sobrien 49133965Sjdp#ifdef TARGET_BIG_SYM 49233965Sjdpconst bfd_target TARGET_BIG_SYM = 49333965Sjdp{ 49433965Sjdp /* name: identify kind of target */ 49533965Sjdp TARGET_BIG_NAME, 49633965Sjdp 49733965Sjdp /* flavour: general indication about file */ 49833965Sjdp bfd_target_elf_flavour, 49933965Sjdp 50033965Sjdp /* byteorder: data is big endian */ 50133965Sjdp BFD_ENDIAN_BIG, 50233965Sjdp 50333965Sjdp /* header_byteorder: header is also big endian */ 50433965Sjdp BFD_ENDIAN_BIG, 50533965Sjdp 50633965Sjdp /* object_flags: mask of all file flags */ 50789857Sobrien (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS 50889857Sobrien | DYNAMIC | WP_TEXT | D_PAGED), 50933965Sjdp 51033965Sjdp /* section_flags: mask of all section flags */ 51189857Sobrien (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY 51289857Sobrien | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES 51389857Sobrien | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), 51433965Sjdp 51533965Sjdp /* leading_symbol_char: is the first char of a user symbol 51633965Sjdp predictable, and if so what is it */ 51733965Sjdp elf_symbol_leading_char, 51833965Sjdp 51933965Sjdp /* ar_pad_char: pad character for filenames within an archive header 52033965Sjdp FIXME: this really has nothing to do with ELF, this is a characteristic 52133965Sjdp of the archiver and/or os and should be independently tunable */ 52233965Sjdp '/', 52333965Sjdp 52433965Sjdp /* ar_max_namelen: maximum number of characters in an archive header 52533965Sjdp FIXME: this really has nothing to do with ELF, this is a characteristic 52633965Sjdp of the archiver and should be independently tunable. This value is 52733965Sjdp a WAG (wild a** guess) */ 52833965Sjdp 14, 52933965Sjdp 53033965Sjdp /* Routines to byte-swap various sized integers from the data sections */ 53133965Sjdp bfd_getb64, bfd_getb_signed_64, bfd_putb64, 53233965Sjdp bfd_getb32, bfd_getb_signed_32, bfd_putb32, 53333965Sjdp bfd_getb16, bfd_getb_signed_16, bfd_putb16, 53433965Sjdp 53533965Sjdp /* Routines to byte-swap various sized integers from the file headers */ 53633965Sjdp bfd_getb64, bfd_getb_signed_64, bfd_putb64, 53733965Sjdp bfd_getb32, bfd_getb_signed_32, bfd_putb32, 53833965Sjdp bfd_getb16, bfd_getb_signed_16, bfd_putb16, 53933965Sjdp 54033965Sjdp /* bfd_check_format: check the format of a file being read */ 54133965Sjdp { _bfd_dummy_target, /* unknown format */ 54233965Sjdp bfd_elfNN_object_p, /* assembler/linker output (object file) */ 54333965Sjdp bfd_elfNN_archive_p, /* an archive */ 54433965Sjdp bfd_elfNN_core_file_p /* a core file */ 54533965Sjdp }, 54633965Sjdp 54733965Sjdp /* bfd_set_format: set the format of a file being written */ 54833965Sjdp { bfd_false, 54933965Sjdp bfd_elfNN_mkobject, 55033965Sjdp bfd_elfNN_mkarchive, 55160484Sobrien bfd_elfNN_mkcorefile 55233965Sjdp }, 55333965Sjdp 55433965Sjdp /* bfd_write_contents: write cached information into a file being written */ 55533965Sjdp { bfd_false, 55633965Sjdp bfd_elfNN_write_object_contents, 55733965Sjdp bfd_elfNN_write_archive_contents, 55860484Sobrien bfd_elfNN_write_corefile_contents, 55933965Sjdp }, 56033965Sjdp 56133965Sjdp BFD_JUMP_TABLE_GENERIC (bfd_elfNN), 56233965Sjdp BFD_JUMP_TABLE_COPY (bfd_elfNN), 56333965Sjdp BFD_JUMP_TABLE_CORE (bfd_elfNN), 56433965Sjdp#ifdef bfd_elfNN_archive_functions 56533965Sjdp BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), 56633965Sjdp#else 56733965Sjdp BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), 56833965Sjdp#endif 56933965Sjdp BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), 57033965Sjdp BFD_JUMP_TABLE_RELOCS (bfd_elfNN), 57133965Sjdp BFD_JUMP_TABLE_WRITE (bfd_elfNN), 57233965Sjdp BFD_JUMP_TABLE_LINK (bfd_elfNN), 57333965Sjdp BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), 57433965Sjdp 57560484Sobrien /* Alternative endian target. */ 57660484Sobrien#ifdef TARGET_LITTLE_SYM 57760484Sobrien & TARGET_LITTLE_SYM, 57860484Sobrien#else 57960484Sobrien NULL, 58060484Sobrien#endif 58160484Sobrien 58233965Sjdp /* backend_data: */ 58360484Sobrien (PTR) &elfNN_bed 58433965Sjdp}; 58533965Sjdp#endif 58633965Sjdp 58733965Sjdp#ifdef TARGET_LITTLE_SYM 58833965Sjdpconst bfd_target TARGET_LITTLE_SYM = 58933965Sjdp{ 59033965Sjdp /* name: identify kind of target */ 59133965Sjdp TARGET_LITTLE_NAME, 59233965Sjdp 59333965Sjdp /* flavour: general indication about file */ 59433965Sjdp bfd_target_elf_flavour, 59533965Sjdp 59633965Sjdp /* byteorder: data is little endian */ 59733965Sjdp BFD_ENDIAN_LITTLE, 59833965Sjdp 59933965Sjdp /* header_byteorder: header is also little endian */ 60033965Sjdp BFD_ENDIAN_LITTLE, 60133965Sjdp 60233965Sjdp /* object_flags: mask of all file flags */ 60389857Sobrien (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS 60489857Sobrien | DYNAMIC | WP_TEXT | D_PAGED), 60533965Sjdp 60633965Sjdp /* section_flags: mask of all section flags */ 60789857Sobrien (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY 60889857Sobrien | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES 60989857Sobrien | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), 61033965Sjdp 61133965Sjdp /* leading_symbol_char: is the first char of a user symbol 61233965Sjdp predictable, and if so what is it */ 61333965Sjdp elf_symbol_leading_char, 61433965Sjdp 61533965Sjdp /* ar_pad_char: pad character for filenames within an archive header 61633965Sjdp FIXME: this really has nothing to do with ELF, this is a characteristic 61733965Sjdp of the archiver and/or os and should be independently tunable */ 61833965Sjdp '/', 61933965Sjdp 62033965Sjdp /* ar_max_namelen: maximum number of characters in an archive header 62133965Sjdp FIXME: this really has nothing to do with ELF, this is a characteristic 62233965Sjdp of the archiver and should be independently tunable. This value is 62333965Sjdp a WAG (wild a** guess) */ 62433965Sjdp 14, 62533965Sjdp 62633965Sjdp /* Routines to byte-swap various sized integers from the data sections */ 62733965Sjdp bfd_getl64, bfd_getl_signed_64, bfd_putl64, 62833965Sjdp bfd_getl32, bfd_getl_signed_32, bfd_putl32, 62933965Sjdp bfd_getl16, bfd_getl_signed_16, bfd_putl16, 63033965Sjdp 63133965Sjdp /* Routines to byte-swap various sized integers from the file headers */ 63233965Sjdp bfd_getl64, bfd_getl_signed_64, bfd_putl64, 63333965Sjdp bfd_getl32, bfd_getl_signed_32, bfd_putl32, 63433965Sjdp bfd_getl16, bfd_getl_signed_16, bfd_putl16, 63533965Sjdp 63633965Sjdp /* bfd_check_format: check the format of a file being read */ 63733965Sjdp { _bfd_dummy_target, /* unknown format */ 63833965Sjdp bfd_elfNN_object_p, /* assembler/linker output (object file) */ 63933965Sjdp bfd_elfNN_archive_p, /* an archive */ 64033965Sjdp bfd_elfNN_core_file_p /* a core file */ 64133965Sjdp }, 64233965Sjdp 64333965Sjdp /* bfd_set_format: set the format of a file being written */ 64433965Sjdp { bfd_false, 64533965Sjdp bfd_elfNN_mkobject, 64633965Sjdp bfd_elfNN_mkarchive, 64760484Sobrien bfd_elfNN_mkcorefile 64833965Sjdp }, 64933965Sjdp 65033965Sjdp /* bfd_write_contents: write cached information into a file being written */ 65133965Sjdp { bfd_false, 65233965Sjdp bfd_elfNN_write_object_contents, 65333965Sjdp bfd_elfNN_write_archive_contents, 65460484Sobrien bfd_elfNN_write_corefile_contents, 65533965Sjdp }, 65633965Sjdp 65733965Sjdp BFD_JUMP_TABLE_GENERIC (bfd_elfNN), 65833965Sjdp BFD_JUMP_TABLE_COPY (bfd_elfNN), 65933965Sjdp BFD_JUMP_TABLE_CORE (bfd_elfNN), 66033965Sjdp#ifdef bfd_elfNN_archive_functions 66133965Sjdp BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), 66233965Sjdp#else 66333965Sjdp BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), 66433965Sjdp#endif 66533965Sjdp BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), 66633965Sjdp BFD_JUMP_TABLE_RELOCS (bfd_elfNN), 66733965Sjdp BFD_JUMP_TABLE_WRITE (bfd_elfNN), 66833965Sjdp BFD_JUMP_TABLE_LINK (bfd_elfNN), 66933965Sjdp BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), 67033965Sjdp 67160484Sobrien /* Alternative endian target. */ 67260484Sobrien#ifdef TARGET_BIG_SYM 67360484Sobrien & TARGET_BIG_SYM, 67460484Sobrien#else 67560484Sobrien NULL, 67660484Sobrien#endif 67777298Sobrien 67833965Sjdp /* backend_data: */ 67960484Sobrien (PTR) &elfNN_bed 68033965Sjdp}; 68133965Sjdp#endif 682