1*a9fa9459Szrj /* Target definitions for NN-bit ELF 2*a9fa9459Szrj Copyright (C) 1993-2016 Free Software Foundation, Inc. 3*a9fa9459Szrj 4*a9fa9459Szrj This file is part of BFD, the Binary File Descriptor library. 5*a9fa9459Szrj 6*a9fa9459Szrj This program is free software; you can redistribute it and/or modify 7*a9fa9459Szrj it under the terms of the GNU General Public License as published by 8*a9fa9459Szrj the Free Software Foundation; either version 3 of the License, or 9*a9fa9459Szrj (at your option) any later version. 10*a9fa9459Szrj 11*a9fa9459Szrj This program is distributed in the hope that it will be useful, 12*a9fa9459Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of 13*a9fa9459Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*a9fa9459Szrj GNU General Public License for more details. 15*a9fa9459Szrj 16*a9fa9459Szrj You should have received a copy of the GNU General Public License 17*a9fa9459Szrj along with this program; if not, write to the Free Software 18*a9fa9459Szrj Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 19*a9fa9459Szrj MA 02110-1301, USA. */ 20*a9fa9459Szrj 21*a9fa9459Szrj 22*a9fa9459Szrj /* This structure contains everything that BFD knows about a target. 23*a9fa9459Szrj It includes things like its byte order, name, what routines to call 24*a9fa9459Szrj to do various operations, etc. Every BFD points to a target structure 25*a9fa9459Szrj with its "xvec" member. 26*a9fa9459Szrj 27*a9fa9459Szrj There are two such structures here: one for big-endian machines and 28*a9fa9459Szrj one for little-endian machines. */ 29*a9fa9459Szrj 30*a9fa9459Szrj #ifndef bfd_elfNN_close_and_cleanup 31*a9fa9459Szrj #define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup 32*a9fa9459Szrj #endif 33*a9fa9459Szrj #ifndef bfd_elfNN_bfd_free_cached_info 34*a9fa9459Szrj #define bfd_elfNN_bfd_free_cached_info _bfd_free_cached_info 35*a9fa9459Szrj #endif 36*a9fa9459Szrj #ifndef bfd_elfNN_get_section_contents 37*a9fa9459Szrj #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents 38*a9fa9459Szrj #endif 39*a9fa9459Szrj 40*a9fa9459Szrj #define bfd_elfNN_canonicalize_dynamic_symtab \ 41*a9fa9459Szrj _bfd_elf_canonicalize_dynamic_symtab 42*a9fa9459Szrj #ifndef bfd_elfNN_get_synthetic_symtab 43*a9fa9459Szrj #define bfd_elfNN_get_synthetic_symtab \ 44*a9fa9459Szrj _bfd_elf_get_synthetic_symtab 45*a9fa9459Szrj #endif 46*a9fa9459Szrj #ifndef bfd_elfNN_canonicalize_reloc 47*a9fa9459Szrj #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc 48*a9fa9459Szrj #endif 49*a9fa9459Szrj #ifndef bfd_elfNN_find_nearest_line 50*a9fa9459Szrj #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line 51*a9fa9459Szrj #endif 52*a9fa9459Szrj #ifndef bfd_elfNN_find_line 53*a9fa9459Szrj #define bfd_elfNN_find_line _bfd_elf_find_line 54*a9fa9459Szrj #endif 55*a9fa9459Szrj #ifndef bfd_elfNN_find_inliner_info 56*a9fa9459Szrj #define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info 57*a9fa9459Szrj #endif 58*a9fa9459Szrj #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols 59*a9fa9459Szrj #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol 60*a9fa9459Szrj #define bfd_elfNN_get_dynamic_symtab_upper_bound \ 61*a9fa9459Szrj _bfd_elf_get_dynamic_symtab_upper_bound 62*a9fa9459Szrj #define bfd_elfNN_get_lineno _bfd_elf_get_lineno 63*a9fa9459Szrj #ifndef bfd_elfNN_get_reloc_upper_bound 64*a9fa9459Szrj #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound 65*a9fa9459Szrj #endif 66*a9fa9459Szrj #ifndef bfd_elfNN_get_symbol_info 67*a9fa9459Szrj #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info 68*a9fa9459Szrj #endif 69*a9fa9459Szrj #ifndef bfd_elfNN_get_symbol_version_string 70*a9fa9459Szrj #define bfd_elfNN_get_symbol_version_string \ 71*a9fa9459Szrj _bfd_elf_get_symbol_version_string 72*a9fa9459Szrj #endif 73*a9fa9459Szrj #define bfd_elfNN_canonicalize_symtab _bfd_elf_canonicalize_symtab 74*a9fa9459Szrj #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound 75*a9fa9459Szrj #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol 76*a9fa9459Szrj #ifndef bfd_elfNN_new_section_hook 77*a9fa9459Szrj #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook 78*a9fa9459Szrj #endif 79*a9fa9459Szrj #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach 80*a9fa9459Szrj #ifndef bfd_elfNN_set_section_contents 81*a9fa9459Szrj #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents 82*a9fa9459Szrj #endif 83*a9fa9459Szrj #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers 84*a9fa9459Szrj #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents 85*a9fa9459Szrj #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents 86*a9fa9459Szrj 87*a9fa9459Szrj #define bfd_elfNN_get_section_contents_in_window \ 88*a9fa9459Szrj _bfd_generic_get_section_contents_in_window 89*a9fa9459Szrj 90*a9fa9459Szrj #ifndef elf_backend_can_refcount 91*a9fa9459Szrj #define elf_backend_can_refcount 0 92*a9fa9459Szrj #endif 93*a9fa9459Szrj #ifndef elf_backend_want_got_plt 94*a9fa9459Szrj #define elf_backend_want_got_plt 0 95*a9fa9459Szrj #endif 96*a9fa9459Szrj #ifndef elf_backend_plt_readonly 97*a9fa9459Szrj #define elf_backend_plt_readonly 0 98*a9fa9459Szrj #endif 99*a9fa9459Szrj #ifndef elf_backend_want_plt_sym 100*a9fa9459Szrj #define elf_backend_want_plt_sym 0 101*a9fa9459Szrj #endif 102*a9fa9459Szrj #ifndef elf_backend_plt_not_loaded 103*a9fa9459Szrj #define elf_backend_plt_not_loaded 0 104*a9fa9459Szrj #endif 105*a9fa9459Szrj #ifndef elf_backend_plt_alignment 106*a9fa9459Szrj #define elf_backend_plt_alignment 2 107*a9fa9459Szrj #endif 108*a9fa9459Szrj #ifndef elf_backend_want_dynbss 109*a9fa9459Szrj #define elf_backend_want_dynbss 1 110*a9fa9459Szrj #endif 111*a9fa9459Szrj #ifndef elf_backend_want_p_paddr_set_to_zero 112*a9fa9459Szrj #define elf_backend_want_p_paddr_set_to_zero 0 113*a9fa9459Szrj #endif 114*a9fa9459Szrj #ifndef elf_backend_default_execstack 115*a9fa9459Szrj #define elf_backend_default_execstack 1 116*a9fa9459Szrj #endif 117*a9fa9459Szrj #ifndef elf_backend_caches_rawsize 118*a9fa9459Szrj #define elf_backend_caches_rawsize 0 119*a9fa9459Szrj #endif 120*a9fa9459Szrj #ifndef elf_backend_extern_protected_data 121*a9fa9459Szrj #define elf_backend_extern_protected_data 0 122*a9fa9459Szrj #endif 123*a9fa9459Szrj #ifndef elf_backend_stack_align 124*a9fa9459Szrj #define elf_backend_stack_align 16 125*a9fa9459Szrj #endif 126*a9fa9459Szrj #ifndef elf_backend_strtab_flags 127*a9fa9459Szrj #define elf_backend_strtab_flags 0 128*a9fa9459Szrj #endif 129*a9fa9459Szrj 130*a9fa9459Szrj #define bfd_elfNN_bfd_debug_info_start bfd_void 131*a9fa9459Szrj #define bfd_elfNN_bfd_debug_info_end bfd_void 132*a9fa9459Szrj #define bfd_elfNN_bfd_debug_info_accumulate \ 133*a9fa9459Szrj ((void (*) (bfd*, struct bfd_section *)) bfd_void) 134*a9fa9459Szrj 135*a9fa9459Szrj #ifndef bfd_elfNN_bfd_get_relocated_section_contents 136*a9fa9459Szrj #define bfd_elfNN_bfd_get_relocated_section_contents \ 137*a9fa9459Szrj bfd_generic_get_relocated_section_contents 138*a9fa9459Szrj #endif 139*a9fa9459Szrj 140*a9fa9459Szrj #ifndef bfd_elfNN_bfd_relax_section 141*a9fa9459Szrj #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section 142*a9fa9459Szrj #endif 143*a9fa9459Szrj 144*a9fa9459Szrj #ifndef elf_backend_can_gc_sections 145*a9fa9459Szrj #define elf_backend_can_gc_sections 0 146*a9fa9459Szrj #endif 147*a9fa9459Szrj #ifndef elf_backend_can_refcount 148*a9fa9459Szrj #define elf_backend_can_refcount 0 149*a9fa9459Szrj #endif 150*a9fa9459Szrj #ifndef elf_backend_want_got_sym 151*a9fa9459Szrj #define elf_backend_want_got_sym 1 152*a9fa9459Szrj #endif 153*a9fa9459Szrj #ifndef elf_backend_gc_keep 154*a9fa9459Szrj #define elf_backend_gc_keep _bfd_elf_gc_keep 155*a9fa9459Szrj #endif 156*a9fa9459Szrj #ifndef elf_backend_gc_mark_dynamic_ref 157*a9fa9459Szrj #define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol 158*a9fa9459Szrj #endif 159*a9fa9459Szrj #ifndef elf_backend_gc_mark_hook 160*a9fa9459Szrj #define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook 161*a9fa9459Szrj #endif 162*a9fa9459Szrj #ifndef elf_backend_gc_mark_extra_sections 163*a9fa9459Szrj #define elf_backend_gc_mark_extra_sections _bfd_elf_gc_mark_extra_sections 164*a9fa9459Szrj #endif 165*a9fa9459Szrj #ifndef elf_backend_gc_sweep_hook 166*a9fa9459Szrj #define elf_backend_gc_sweep_hook NULL 167*a9fa9459Szrj #endif 168*a9fa9459Szrj #ifndef bfd_elfNN_bfd_gc_sections 169*a9fa9459Szrj #define bfd_elfNN_bfd_gc_sections bfd_elf_gc_sections 170*a9fa9459Szrj #endif 171*a9fa9459Szrj 172*a9fa9459Szrj #ifndef bfd_elfNN_bfd_merge_sections 173*a9fa9459Szrj #define bfd_elfNN_bfd_merge_sections \ 174*a9fa9459Szrj _bfd_elf_merge_sections 175*a9fa9459Szrj #endif 176*a9fa9459Szrj 177*a9fa9459Szrj #ifndef bfd_elfNN_bfd_is_group_section 178*a9fa9459Szrj #define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section 179*a9fa9459Szrj #endif 180*a9fa9459Szrj 181*a9fa9459Szrj #ifndef bfd_elfNN_bfd_discard_group 182*a9fa9459Szrj #define bfd_elfNN_bfd_discard_group bfd_generic_discard_group 183*a9fa9459Szrj #endif 184*a9fa9459Szrj 185*a9fa9459Szrj #ifndef bfd_elfNN_section_already_linked 186*a9fa9459Szrj #define bfd_elfNN_section_already_linked \ 187*a9fa9459Szrj _bfd_elf_section_already_linked 188*a9fa9459Szrj #endif 189*a9fa9459Szrj 190*a9fa9459Szrj #ifndef bfd_elfNN_bfd_define_common_symbol 191*a9fa9459Szrj #define bfd_elfNN_bfd_define_common_symbol bfd_generic_define_common_symbol 192*a9fa9459Szrj #endif 193*a9fa9459Szrj 194*a9fa9459Szrj #ifndef bfd_elfNN_bfd_lookup_section_flags 195*a9fa9459Szrj #define bfd_elfNN_bfd_lookup_section_flags bfd_elf_lookup_section_flags 196*a9fa9459Szrj #endif 197*a9fa9459Szrj 198*a9fa9459Szrj #ifndef bfd_elfNN_bfd_make_debug_symbol 199*a9fa9459Szrj #define bfd_elfNN_bfd_make_debug_symbol \ 200*a9fa9459Szrj ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) 201*a9fa9459Szrj #endif 202*a9fa9459Szrj 203*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_private_symbol_data 204*a9fa9459Szrj #define bfd_elfNN_bfd_copy_private_symbol_data \ 205*a9fa9459Szrj _bfd_elf_copy_private_symbol_data 206*a9fa9459Szrj #endif 207*a9fa9459Szrj 208*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_private_section_data 209*a9fa9459Szrj #define bfd_elfNN_bfd_copy_private_section_data \ 210*a9fa9459Szrj _bfd_elf_copy_private_section_data 211*a9fa9459Szrj #endif 212*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_private_header_data 213*a9fa9459Szrj #define bfd_elfNN_bfd_copy_private_header_data \ 214*a9fa9459Szrj _bfd_elf_copy_private_header_data 215*a9fa9459Szrj #endif 216*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_private_bfd_data 217*a9fa9459Szrj #define bfd_elfNN_bfd_copy_private_bfd_data \ 218*a9fa9459Szrj _bfd_elf_copy_private_bfd_data 219*a9fa9459Szrj #endif 220*a9fa9459Szrj #ifndef bfd_elfNN_bfd_print_private_bfd_data 221*a9fa9459Szrj #define bfd_elfNN_bfd_print_private_bfd_data \ 222*a9fa9459Szrj _bfd_elf_print_private_bfd_data 223*a9fa9459Szrj #endif 224*a9fa9459Szrj #ifndef bfd_elfNN_bfd_merge_private_bfd_data 225*a9fa9459Szrj #define bfd_elfNN_bfd_merge_private_bfd_data \ 226*a9fa9459Szrj ((bfd_boolean (*) (bfd *, bfd *)) bfd_true) 227*a9fa9459Szrj #endif 228*a9fa9459Szrj #ifndef bfd_elfNN_bfd_set_private_flags 229*a9fa9459Szrj #define bfd_elfNN_bfd_set_private_flags \ 230*a9fa9459Szrj ((bfd_boolean (*) (bfd *, flagword)) bfd_true) 231*a9fa9459Szrj #endif 232*a9fa9459Szrj #ifndef bfd_elfNN_bfd_is_local_label_name 233*a9fa9459Szrj #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name 234*a9fa9459Szrj #endif 235*a9fa9459Szrj #ifndef bfd_elfNN_bfd_is_target_special_symbol 236*a9fa9459Szrj #define bfd_elfNN_bfd_is_target_special_symbol \ 237*a9fa9459Szrj ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) 238*a9fa9459Szrj #endif 239*a9fa9459Szrj 240*a9fa9459Szrj #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound 241*a9fa9459Szrj #define bfd_elfNN_get_dynamic_reloc_upper_bound \ 242*a9fa9459Szrj _bfd_elf_get_dynamic_reloc_upper_bound 243*a9fa9459Szrj #endif 244*a9fa9459Szrj #ifndef bfd_elfNN_canonicalize_dynamic_reloc 245*a9fa9459Szrj #define bfd_elfNN_canonicalize_dynamic_reloc \ 246*a9fa9459Szrj _bfd_elf_canonicalize_dynamic_reloc 247*a9fa9459Szrj #endif 248*a9fa9459Szrj 249*a9fa9459Szrj #ifdef elf_backend_relocate_section 250*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_hash_table_create 251*a9fa9459Szrj #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create 252*a9fa9459Szrj #endif 253*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type 254*a9fa9459Szrj #define bfd_elfNN_bfd_copy_link_hash_symbol_type \ 255*a9fa9459Szrj _bfd_elf_copy_link_hash_symbol_type 256*a9fa9459Szrj #endif 257*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_add_symbols 258*a9fa9459Szrj #define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols 259*a9fa9459Szrj #endif 260*a9fa9459Szrj #ifndef bfd_elfNN_bfd_final_link 261*a9fa9459Szrj #define bfd_elfNN_bfd_final_link bfd_elf_final_link 262*a9fa9459Szrj #endif 263*a9fa9459Szrj #else /* ! defined (elf_backend_relocate_section) */ 264*a9fa9459Szrj /* If no backend relocate_section routine, use the generic linker. 265*a9fa9459Szrj Note - this will prevent the port from being able to use some of 266*a9fa9459Szrj the other features of the ELF linker, because the generic hash structure 267*a9fa9459Szrj does not have the fields needed by the ELF linker. In particular it 268*a9fa9459Szrj means that linking directly to S-records will not work. */ 269*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_hash_table_create 270*a9fa9459Szrj #define bfd_elfNN_bfd_link_hash_table_create \ 271*a9fa9459Szrj _bfd_generic_link_hash_table_create 272*a9fa9459Szrj #endif 273*a9fa9459Szrj #ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type 274*a9fa9459Szrj #define bfd_elfNN_bfd_copy_link_hash_symbol_type \ 275*a9fa9459Szrj _bfd_generic_copy_link_hash_symbol_type 276*a9fa9459Szrj #endif 277*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_add_symbols 278*a9fa9459Szrj #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols 279*a9fa9459Szrj #endif 280*a9fa9459Szrj #ifndef bfd_elfNN_bfd_final_link 281*a9fa9459Szrj #define bfd_elfNN_bfd_final_link _bfd_generic_final_link 282*a9fa9459Szrj #endif 283*a9fa9459Szrj #endif /* ! defined (elf_backend_relocate_section) */ 284*a9fa9459Szrj 285*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_just_syms 286*a9fa9459Szrj #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms 287*a9fa9459Szrj #endif 288*a9fa9459Szrj 289*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_split_section 290*a9fa9459Szrj #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section 291*a9fa9459Szrj #endif 292*a9fa9459Szrj 293*a9fa9459Szrj #ifndef bfd_elfNN_bfd_link_check_relocs 294*a9fa9459Szrj #define bfd_elfNN_bfd_link_check_relocs _bfd_elf_link_check_relocs 295*a9fa9459Szrj #endif 296*a9fa9459Szrj 297*a9fa9459Szrj #ifndef bfd_elfNN_archive_p 298*a9fa9459Szrj #define bfd_elfNN_archive_p bfd_generic_archive_p 299*a9fa9459Szrj #endif 300*a9fa9459Szrj 301*a9fa9459Szrj #ifndef bfd_elfNN_write_archive_contents 302*a9fa9459Szrj #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents 303*a9fa9459Szrj #endif 304*a9fa9459Szrj 305*a9fa9459Szrj #ifndef bfd_elfNN_mkobject 306*a9fa9459Szrj #define bfd_elfNN_mkobject bfd_elf_make_object 307*a9fa9459Szrj #endif 308*a9fa9459Szrj 309*a9fa9459Szrj #ifndef bfd_elfNN_mkcorefile 310*a9fa9459Szrj #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile 311*a9fa9459Szrj #endif 312*a9fa9459Szrj 313*a9fa9459Szrj #ifndef bfd_elfNN_mkarchive 314*a9fa9459Szrj #define bfd_elfNN_mkarchive _bfd_generic_mkarchive 315*a9fa9459Szrj #endif 316*a9fa9459Szrj 317*a9fa9459Szrj #ifndef bfd_elfNN_print_symbol 318*a9fa9459Szrj #define bfd_elfNN_print_symbol bfd_elf_print_symbol 319*a9fa9459Szrj #endif 320*a9fa9459Szrj 321*a9fa9459Szrj #ifndef elf_symbol_leading_char 322*a9fa9459Szrj #define elf_symbol_leading_char 0 323*a9fa9459Szrj #endif 324*a9fa9459Szrj 325*a9fa9459Szrj #ifndef elf_info_to_howto 326*a9fa9459Szrj #define elf_info_to_howto 0 327*a9fa9459Szrj #endif 328*a9fa9459Szrj 329*a9fa9459Szrj #ifndef elf_info_to_howto_rel 330*a9fa9459Szrj #define elf_info_to_howto_rel 0 331*a9fa9459Szrj #endif 332*a9fa9459Szrj 333*a9fa9459Szrj #ifndef elf_backend_arch_data 334*a9fa9459Szrj #define elf_backend_arch_data NULL 335*a9fa9459Szrj #endif 336*a9fa9459Szrj 337*a9fa9459Szrj #ifndef ELF_TARGET_ID 338*a9fa9459Szrj #define ELF_TARGET_ID GENERIC_ELF_DATA 339*a9fa9459Szrj #endif 340*a9fa9459Szrj 341*a9fa9459Szrj #ifndef ELF_OSABI 342*a9fa9459Szrj #define ELF_OSABI ELFOSABI_NONE 343*a9fa9459Szrj #endif 344*a9fa9459Szrj 345*a9fa9459Szrj #ifndef ELF_MAXPAGESIZE 346*a9fa9459Szrj # error ELF_MAXPAGESIZE is not defined 347*a9fa9459Szrj #define ELF_MAXPAGESIZE 1 348*a9fa9459Szrj #endif 349*a9fa9459Szrj 350*a9fa9459Szrj #ifndef ELF_COMMONPAGESIZE 351*a9fa9459Szrj #define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE 352*a9fa9459Szrj #endif 353*a9fa9459Szrj 354*a9fa9459Szrj #ifndef ELF_MINPAGESIZE 355*a9fa9459Szrj #define ELF_MINPAGESIZE ELF_COMMONPAGESIZE 356*a9fa9459Szrj #endif 357*a9fa9459Szrj 358*a9fa9459Szrj #if ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE 359*a9fa9459Szrj # error ELF_COMMONPAGESIZE > ELF_MAXPAGESIZE 360*a9fa9459Szrj #endif 361*a9fa9459Szrj #if ELF_MINPAGESIZE > ELF_COMMONPAGESIZE 362*a9fa9459Szrj # error ELF_MINPAGESIZE > ELF_COMMONPAGESIZE 363*a9fa9459Szrj #endif 364*a9fa9459Szrj 365*a9fa9459Szrj #ifndef ELF_DYNAMIC_SEC_FLAGS 366*a9fa9459Szrj /* Note that we set the SEC_IN_MEMORY flag for these sections. */ 367*a9fa9459Szrj #define ELF_DYNAMIC_SEC_FLAGS \ 368*a9fa9459Szrj (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS \ 369*a9fa9459Szrj | SEC_IN_MEMORY | SEC_LINKER_CREATED) 370*a9fa9459Szrj #endif 371*a9fa9459Szrj 372*a9fa9459Szrj #ifndef elf_backend_collect 373*a9fa9459Szrj #define elf_backend_collect FALSE 374*a9fa9459Szrj #endif 375*a9fa9459Szrj #ifndef elf_backend_type_change_ok 376*a9fa9459Szrj #define elf_backend_type_change_ok FALSE 377*a9fa9459Szrj #endif 378*a9fa9459Szrj 379*a9fa9459Szrj #ifndef elf_backend_sym_is_global 380*a9fa9459Szrj #define elf_backend_sym_is_global 0 381*a9fa9459Szrj #endif 382*a9fa9459Szrj #ifndef elf_backend_object_p 383*a9fa9459Szrj #define elf_backend_object_p 0 384*a9fa9459Szrj #endif 385*a9fa9459Szrj #ifndef elf_backend_symbol_processing 386*a9fa9459Szrj #define elf_backend_symbol_processing 0 387*a9fa9459Szrj #endif 388*a9fa9459Szrj #ifndef elf_backend_symbol_table_processing 389*a9fa9459Szrj #define elf_backend_symbol_table_processing 0 390*a9fa9459Szrj #endif 391*a9fa9459Szrj #ifndef elf_backend_get_symbol_type 392*a9fa9459Szrj #define elf_backend_get_symbol_type 0 393*a9fa9459Szrj #endif 394*a9fa9459Szrj #ifndef elf_backend_archive_symbol_lookup 395*a9fa9459Szrj #define elf_backend_archive_symbol_lookup _bfd_elf_archive_symbol_lookup 396*a9fa9459Szrj #endif 397*a9fa9459Szrj #ifndef elf_backend_name_local_section_symbols 398*a9fa9459Szrj #define elf_backend_name_local_section_symbols 0 399*a9fa9459Szrj #endif 400*a9fa9459Szrj #ifndef elf_backend_section_processing 401*a9fa9459Szrj #define elf_backend_section_processing 0 402*a9fa9459Szrj #endif 403*a9fa9459Szrj #ifndef elf_backend_section_from_shdr 404*a9fa9459Szrj #define elf_backend_section_from_shdr _bfd_elf_make_section_from_shdr 405*a9fa9459Szrj #endif 406*a9fa9459Szrj #ifndef elf_backend_section_flags 407*a9fa9459Szrj #define elf_backend_section_flags 0 408*a9fa9459Szrj #endif 409*a9fa9459Szrj #ifndef elf_backend_get_sec_type_attr 410*a9fa9459Szrj #define elf_backend_get_sec_type_attr _bfd_elf_get_sec_type_attr 411*a9fa9459Szrj #endif 412*a9fa9459Szrj #ifndef elf_backend_section_from_phdr 413*a9fa9459Szrj #define elf_backend_section_from_phdr _bfd_elf_make_section_from_phdr 414*a9fa9459Szrj #endif 415*a9fa9459Szrj #ifndef elf_backend_fake_sections 416*a9fa9459Szrj #define elf_backend_fake_sections 0 417*a9fa9459Szrj #endif 418*a9fa9459Szrj #ifndef elf_backend_section_from_bfd_section 419*a9fa9459Szrj #define elf_backend_section_from_bfd_section 0 420*a9fa9459Szrj #endif 421*a9fa9459Szrj #ifndef elf_backend_add_symbol_hook 422*a9fa9459Szrj #define elf_backend_add_symbol_hook 0 423*a9fa9459Szrj #endif 424*a9fa9459Szrj #ifndef elf_backend_link_output_symbol_hook 425*a9fa9459Szrj #define elf_backend_link_output_symbol_hook 0 426*a9fa9459Szrj #endif 427*a9fa9459Szrj #ifndef elf_backend_create_dynamic_sections 428*a9fa9459Szrj #define elf_backend_create_dynamic_sections 0 429*a9fa9459Szrj #endif 430*a9fa9459Szrj #ifndef elf_backend_omit_section_dynsym 431*a9fa9459Szrj #define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym 432*a9fa9459Szrj #endif 433*a9fa9459Szrj #ifndef elf_backend_relocs_compatible 434*a9fa9459Szrj #define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible 435*a9fa9459Szrj #endif 436*a9fa9459Szrj #ifndef elf_backend_check_relocs 437*a9fa9459Szrj #define elf_backend_check_relocs 0 438*a9fa9459Szrj #endif 439*a9fa9459Szrj #ifndef elf_backend_check_directives 440*a9fa9459Szrj #define elf_backend_check_directives 0 441*a9fa9459Szrj #endif 442*a9fa9459Szrj #ifndef elf_backend_notice_as_needed 443*a9fa9459Szrj #define elf_backend_notice_as_needed _bfd_elf_notice_as_needed 444*a9fa9459Szrj #endif 445*a9fa9459Szrj #ifndef elf_backend_adjust_dynamic_symbol 446*a9fa9459Szrj #define elf_backend_adjust_dynamic_symbol 0 447*a9fa9459Szrj #endif 448*a9fa9459Szrj #ifndef elf_backend_always_size_sections 449*a9fa9459Szrj #define elf_backend_always_size_sections 0 450*a9fa9459Szrj #endif 451*a9fa9459Szrj #ifndef elf_backend_size_dynamic_sections 452*a9fa9459Szrj #define elf_backend_size_dynamic_sections 0 453*a9fa9459Szrj #endif 454*a9fa9459Szrj #ifndef elf_backend_init_index_section 455*a9fa9459Szrj #define elf_backend_init_index_section \ 456*a9fa9459Szrj ((void (*) (bfd *, struct bfd_link_info *)) bfd_void) 457*a9fa9459Szrj #endif 458*a9fa9459Szrj #ifndef elf_backend_relocate_section 459*a9fa9459Szrj #define elf_backend_relocate_section 0 460*a9fa9459Szrj #endif 461*a9fa9459Szrj #ifndef elf_backend_finish_dynamic_symbol 462*a9fa9459Szrj #define elf_backend_finish_dynamic_symbol 0 463*a9fa9459Szrj #endif 464*a9fa9459Szrj #ifndef elf_backend_finish_dynamic_sections 465*a9fa9459Szrj #define elf_backend_finish_dynamic_sections 0 466*a9fa9459Szrj #endif 467*a9fa9459Szrj #ifndef elf_backend_begin_write_processing 468*a9fa9459Szrj #define elf_backend_begin_write_processing 0 469*a9fa9459Szrj #endif 470*a9fa9459Szrj #ifndef elf_backend_final_write_processing 471*a9fa9459Szrj #define elf_backend_final_write_processing 0 472*a9fa9459Szrj #endif 473*a9fa9459Szrj #ifndef elf_backend_additional_program_headers 474*a9fa9459Szrj #define elf_backend_additional_program_headers 0 475*a9fa9459Szrj #endif 476*a9fa9459Szrj #ifndef elf_backend_modify_segment_map 477*a9fa9459Szrj #define elf_backend_modify_segment_map 0 478*a9fa9459Szrj #endif 479*a9fa9459Szrj #ifndef elf_backend_modify_program_headers 480*a9fa9459Szrj #define elf_backend_modify_program_headers 0 481*a9fa9459Szrj #endif 482*a9fa9459Szrj #ifndef elf_backend_ecoff_debug_swap 483*a9fa9459Szrj #define elf_backend_ecoff_debug_swap 0 484*a9fa9459Szrj #endif 485*a9fa9459Szrj #ifndef elf_backend_bfd_from_remote_memory 486*a9fa9459Szrj #define elf_backend_bfd_from_remote_memory _bfd_elfNN_bfd_from_remote_memory 487*a9fa9459Szrj #endif 488*a9fa9459Szrj #ifndef elf_backend_got_header_size 489*a9fa9459Szrj #define elf_backend_got_header_size 0 490*a9fa9459Szrj #endif 491*a9fa9459Szrj #ifndef elf_backend_got_elt_size 492*a9fa9459Szrj #define elf_backend_got_elt_size _bfd_elf_default_got_elt_size 493*a9fa9459Szrj #endif 494*a9fa9459Szrj #ifndef elf_backend_obj_attrs_vendor 495*a9fa9459Szrj #define elf_backend_obj_attrs_vendor NULL 496*a9fa9459Szrj #endif 497*a9fa9459Szrj #ifndef elf_backend_obj_attrs_section 498*a9fa9459Szrj #define elf_backend_obj_attrs_section NULL 499*a9fa9459Szrj #endif 500*a9fa9459Szrj #ifndef elf_backend_obj_attrs_arg_type 501*a9fa9459Szrj #define elf_backend_obj_attrs_arg_type NULL 502*a9fa9459Szrj #endif 503*a9fa9459Szrj #ifndef elf_backend_obj_attrs_section_type 504*a9fa9459Szrj #define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES 505*a9fa9459Szrj #endif 506*a9fa9459Szrj #ifndef elf_backend_obj_attrs_order 507*a9fa9459Szrj #define elf_backend_obj_attrs_order NULL 508*a9fa9459Szrj #endif 509*a9fa9459Szrj #ifndef elf_backend_obj_attrs_handle_unknown 510*a9fa9459Szrj #define elf_backend_obj_attrs_handle_unknown NULL 511*a9fa9459Szrj #endif 512*a9fa9459Szrj #ifndef elf_backend_static_tls_alignment 513*a9fa9459Szrj #define elf_backend_static_tls_alignment 1 514*a9fa9459Szrj #endif 515*a9fa9459Szrj #ifndef elf_backend_post_process_headers 516*a9fa9459Szrj #define elf_backend_post_process_headers _bfd_elf_post_process_headers 517*a9fa9459Szrj #endif 518*a9fa9459Szrj #ifndef elf_backend_print_symbol_all 519*a9fa9459Szrj #define elf_backend_print_symbol_all NULL 520*a9fa9459Szrj #endif 521*a9fa9459Szrj #ifndef elf_backend_output_arch_local_syms 522*a9fa9459Szrj #define elf_backend_output_arch_local_syms NULL 523*a9fa9459Szrj #endif 524*a9fa9459Szrj #ifndef elf_backend_output_arch_syms 525*a9fa9459Szrj #define elf_backend_output_arch_syms NULL 526*a9fa9459Szrj #endif 527*a9fa9459Szrj #ifndef elf_backend_copy_indirect_symbol 528*a9fa9459Szrj #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect 529*a9fa9459Szrj #endif 530*a9fa9459Szrj #ifndef elf_backend_hide_symbol 531*a9fa9459Szrj #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol 532*a9fa9459Szrj #endif 533*a9fa9459Szrj #ifndef elf_backend_fixup_symbol 534*a9fa9459Szrj #define elf_backend_fixup_symbol NULL 535*a9fa9459Szrj #endif 536*a9fa9459Szrj #ifndef elf_backend_merge_symbol_attribute 537*a9fa9459Szrj #define elf_backend_merge_symbol_attribute NULL 538*a9fa9459Szrj #endif 539*a9fa9459Szrj #ifndef elf_backend_get_target_dtag 540*a9fa9459Szrj #define elf_backend_get_target_dtag NULL 541*a9fa9459Szrj #endif 542*a9fa9459Szrj #ifndef elf_backend_ignore_undef_symbol 543*a9fa9459Szrj #define elf_backend_ignore_undef_symbol NULL 544*a9fa9459Szrj #endif 545*a9fa9459Szrj #ifndef elf_backend_emit_relocs 546*a9fa9459Szrj #define elf_backend_emit_relocs _bfd_elf_link_output_relocs 547*a9fa9459Szrj #endif 548*a9fa9459Szrj #ifndef elf_backend_count_relocs 549*a9fa9459Szrj #define elf_backend_count_relocs NULL 550*a9fa9459Szrj #endif 551*a9fa9459Szrj #ifndef elf_backend_count_additional_relocs 552*a9fa9459Szrj #define elf_backend_count_additional_relocs NULL 553*a9fa9459Szrj #endif 554*a9fa9459Szrj #ifndef elf_backend_sort_relocs_p 555*a9fa9459Szrj #define elf_backend_sort_relocs_p NULL 556*a9fa9459Szrj #endif 557*a9fa9459Szrj #ifndef elf_backend_grok_prstatus 558*a9fa9459Szrj #define elf_backend_grok_prstatus NULL 559*a9fa9459Szrj #endif 560*a9fa9459Szrj #ifndef elf_backend_grok_psinfo 561*a9fa9459Szrj #define elf_backend_grok_psinfo NULL 562*a9fa9459Szrj #endif 563*a9fa9459Szrj #ifndef elf_backend_write_core_note 564*a9fa9459Szrj #define elf_backend_write_core_note NULL 565*a9fa9459Szrj #endif 566*a9fa9459Szrj #ifndef elf_backend_lookup_section_flags_hook 567*a9fa9459Szrj #define elf_backend_lookup_section_flags_hook NULL 568*a9fa9459Szrj #endif 569*a9fa9459Szrj #ifndef elf_backend_reloc_type_class 570*a9fa9459Szrj #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class 571*a9fa9459Szrj #endif 572*a9fa9459Szrj #ifndef elf_backend_discard_info 573*a9fa9459Szrj #define elf_backend_discard_info NULL 574*a9fa9459Szrj #endif 575*a9fa9459Szrj #ifndef elf_backend_ignore_discarded_relocs 576*a9fa9459Szrj #define elf_backend_ignore_discarded_relocs NULL 577*a9fa9459Szrj #endif 578*a9fa9459Szrj #ifndef elf_backend_action_discarded 579*a9fa9459Szrj #define elf_backend_action_discarded _bfd_elf_default_action_discarded 580*a9fa9459Szrj #endif 581*a9fa9459Szrj #ifndef elf_backend_eh_frame_address_size 582*a9fa9459Szrj #define elf_backend_eh_frame_address_size _bfd_elf_eh_frame_address_size 583*a9fa9459Szrj #endif 584*a9fa9459Szrj #ifndef elf_backend_can_make_relative_eh_frame 585*a9fa9459Szrj #define elf_backend_can_make_relative_eh_frame _bfd_elf_can_make_relative 586*a9fa9459Szrj #endif 587*a9fa9459Szrj #ifndef elf_backend_can_make_lsda_relative_eh_frame 588*a9fa9459Szrj #define elf_backend_can_make_lsda_relative_eh_frame _bfd_elf_can_make_relative 589*a9fa9459Szrj #endif 590*a9fa9459Szrj #ifndef elf_backend_encode_eh_address 591*a9fa9459Szrj #define elf_backend_encode_eh_address _bfd_elf_encode_eh_address 592*a9fa9459Szrj #endif 593*a9fa9459Szrj #ifndef elf_backend_write_section 594*a9fa9459Szrj #define elf_backend_write_section NULL 595*a9fa9459Szrj #endif 596*a9fa9459Szrj #ifndef elf_backend_mips_irix_compat 597*a9fa9459Szrj #define elf_backend_mips_irix_compat NULL 598*a9fa9459Szrj #endif 599*a9fa9459Szrj #ifndef elf_backend_mips_rtype_to_howto 600*a9fa9459Szrj #define elf_backend_mips_rtype_to_howto NULL 601*a9fa9459Szrj #endif 602*a9fa9459Szrj 603*a9fa9459Szrj /* Previously, backends could only use SHT_REL or SHT_RELA relocation 604*a9fa9459Szrj sections, but not both. They defined USE_REL to indicate SHT_REL 605*a9fa9459Szrj sections, and left it undefined to indicated SHT_RELA sections. 606*a9fa9459Szrj For backwards compatibility, we still support this usage. */ 607*a9fa9459Szrj #ifndef USE_REL 608*a9fa9459Szrj #define USE_REL 0 609*a9fa9459Szrj #endif 610*a9fa9459Szrj 611*a9fa9459Szrj /* Use these in new code. */ 612*a9fa9459Szrj #ifndef elf_backend_may_use_rel_p 613*a9fa9459Szrj #define elf_backend_may_use_rel_p USE_REL 614*a9fa9459Szrj #endif 615*a9fa9459Szrj #ifndef elf_backend_may_use_rela_p 616*a9fa9459Szrj #define elf_backend_may_use_rela_p !USE_REL 617*a9fa9459Szrj #endif 618*a9fa9459Szrj #ifndef elf_backend_default_use_rela_p 619*a9fa9459Szrj #define elf_backend_default_use_rela_p !USE_REL 620*a9fa9459Szrj #endif 621*a9fa9459Szrj #ifndef elf_backend_rela_plts_and_copies_p 622*a9fa9459Szrj #define elf_backend_rela_plts_and_copies_p elf_backend_default_use_rela_p 623*a9fa9459Szrj #endif 624*a9fa9459Szrj 625*a9fa9459Szrj #ifndef elf_backend_rela_normal 626*a9fa9459Szrj #define elf_backend_rela_normal 0 627*a9fa9459Szrj #endif 628*a9fa9459Szrj 629*a9fa9459Szrj #ifndef elf_backend_plt_sym_val 630*a9fa9459Szrj #define elf_backend_plt_sym_val NULL 631*a9fa9459Szrj #endif 632*a9fa9459Szrj #ifndef elf_backend_relplt_name 633*a9fa9459Szrj #define elf_backend_relplt_name NULL 634*a9fa9459Szrj #endif 635*a9fa9459Szrj 636*a9fa9459Szrj #ifndef ELF_MACHINE_ALT1 637*a9fa9459Szrj #define ELF_MACHINE_ALT1 0 638*a9fa9459Szrj #endif 639*a9fa9459Szrj 640*a9fa9459Szrj #ifndef ELF_MACHINE_ALT2 641*a9fa9459Szrj #define ELF_MACHINE_ALT2 0 642*a9fa9459Szrj #endif 643*a9fa9459Szrj 644*a9fa9459Szrj #ifndef elf_backend_size_info 645*a9fa9459Szrj #define elf_backend_size_info _bfd_elfNN_size_info 646*a9fa9459Szrj #endif 647*a9fa9459Szrj 648*a9fa9459Szrj #ifndef elf_backend_special_sections 649*a9fa9459Szrj #define elf_backend_special_sections NULL 650*a9fa9459Szrj #endif 651*a9fa9459Szrj 652*a9fa9459Szrj #ifndef elf_backend_sign_extend_vma 653*a9fa9459Szrj #define elf_backend_sign_extend_vma 0 654*a9fa9459Szrj #endif 655*a9fa9459Szrj 656*a9fa9459Szrj #ifndef elf_backend_link_order_error_handler 657*a9fa9459Szrj #define elf_backend_link_order_error_handler _bfd_default_error_handler 658*a9fa9459Szrj #endif 659*a9fa9459Szrj 660*a9fa9459Szrj #ifndef elf_backend_common_definition 661*a9fa9459Szrj #define elf_backend_common_definition _bfd_elf_common_definition 662*a9fa9459Szrj #endif 663*a9fa9459Szrj 664*a9fa9459Szrj #ifndef elf_backend_common_section_index 665*a9fa9459Szrj #define elf_backend_common_section_index _bfd_elf_common_section_index 666*a9fa9459Szrj #endif 667*a9fa9459Szrj 668*a9fa9459Szrj #ifndef elf_backend_common_section 669*a9fa9459Szrj #define elf_backend_common_section _bfd_elf_common_section 670*a9fa9459Szrj #endif 671*a9fa9459Szrj 672*a9fa9459Szrj #ifndef elf_backend_merge_symbol 673*a9fa9459Szrj #define elf_backend_merge_symbol NULL 674*a9fa9459Szrj #endif 675*a9fa9459Szrj 676*a9fa9459Szrj #ifndef elf_backend_hash_symbol 677*a9fa9459Szrj #define elf_backend_hash_symbol _bfd_elf_hash_symbol 678*a9fa9459Szrj #endif 679*a9fa9459Szrj 680*a9fa9459Szrj #ifndef elf_backend_is_function_type 681*a9fa9459Szrj #define elf_backend_is_function_type _bfd_elf_is_function_type 682*a9fa9459Szrj #endif 683*a9fa9459Szrj 684*a9fa9459Szrj #ifndef elf_backend_maybe_function_sym 685*a9fa9459Szrj #define elf_backend_maybe_function_sym _bfd_elf_maybe_function_sym 686*a9fa9459Szrj #endif 687*a9fa9459Szrj 688*a9fa9459Szrj #ifndef elf_backend_get_reloc_section 689*a9fa9459Szrj #define elf_backend_get_reloc_section _bfd_elf_get_reloc_section 690*a9fa9459Szrj #endif 691*a9fa9459Szrj 692*a9fa9459Szrj #ifndef elf_backend_copy_special_section_fields 693*a9fa9459Szrj #define elf_backend_copy_special_section_fields NULL 694*a9fa9459Szrj #endif 695*a9fa9459Szrj 696*a9fa9459Szrj #ifndef elf_backend_compact_eh_encoding 697*a9fa9459Szrj #define elf_backend_compact_eh_encoding NULL 698*a9fa9459Szrj #endif 699*a9fa9459Szrj 700*a9fa9459Szrj #ifndef elf_backend_cant_unwind_opcode 701*a9fa9459Szrj #define elf_backend_cant_unwind_opcode 0 702*a9fa9459Szrj #endif 703*a9fa9459Szrj 704*a9fa9459Szrj #ifndef elf_match_priority 705*a9fa9459Szrj #define elf_match_priority \ 706*a9fa9459Szrj (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0) 707*a9fa9459Szrj #endif 708*a9fa9459Szrj 709*a9fa9459Szrj extern const struct elf_size_info _bfd_elfNN_size_info; 710*a9fa9459Szrj 711*a9fa9459Szrj static struct elf_backend_data elfNN_bed = 712*a9fa9459Szrj { 713*a9fa9459Szrj ELF_ARCH, /* arch */ 714*a9fa9459Szrj ELF_TARGET_ID, /* target_id */ 715*a9fa9459Szrj ELF_MACHINE_CODE, /* elf_machine_code */ 716*a9fa9459Szrj ELF_OSABI, /* elf_osabi */ 717*a9fa9459Szrj ELF_MAXPAGESIZE, /* maxpagesize */ 718*a9fa9459Szrj ELF_MINPAGESIZE, /* minpagesize */ 719*a9fa9459Szrj ELF_COMMONPAGESIZE, /* commonpagesize */ 720*a9fa9459Szrj ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */ 721*a9fa9459Szrj elf_backend_arch_data, 722*a9fa9459Szrj elf_info_to_howto, 723*a9fa9459Szrj elf_info_to_howto_rel, 724*a9fa9459Szrj elf_backend_sym_is_global, 725*a9fa9459Szrj elf_backend_object_p, 726*a9fa9459Szrj elf_backend_symbol_processing, 727*a9fa9459Szrj elf_backend_symbol_table_processing, 728*a9fa9459Szrj elf_backend_get_symbol_type, 729*a9fa9459Szrj elf_backend_archive_symbol_lookup, 730*a9fa9459Szrj elf_backend_name_local_section_symbols, 731*a9fa9459Szrj elf_backend_section_processing, 732*a9fa9459Szrj elf_backend_section_from_shdr, 733*a9fa9459Szrj elf_backend_section_flags, 734*a9fa9459Szrj elf_backend_get_sec_type_attr, 735*a9fa9459Szrj elf_backend_section_from_phdr, 736*a9fa9459Szrj elf_backend_fake_sections, 737*a9fa9459Szrj elf_backend_section_from_bfd_section, 738*a9fa9459Szrj elf_backend_add_symbol_hook, 739*a9fa9459Szrj elf_backend_link_output_symbol_hook, 740*a9fa9459Szrj elf_backend_create_dynamic_sections, 741*a9fa9459Szrj elf_backend_omit_section_dynsym, 742*a9fa9459Szrj elf_backend_relocs_compatible, 743*a9fa9459Szrj elf_backend_check_relocs, 744*a9fa9459Szrj elf_backend_check_directives, 745*a9fa9459Szrj elf_backend_notice_as_needed, 746*a9fa9459Szrj elf_backend_adjust_dynamic_symbol, 747*a9fa9459Szrj elf_backend_always_size_sections, 748*a9fa9459Szrj elf_backend_size_dynamic_sections, 749*a9fa9459Szrj elf_backend_init_index_section, 750*a9fa9459Szrj elf_backend_relocate_section, 751*a9fa9459Szrj elf_backend_finish_dynamic_symbol, 752*a9fa9459Szrj elf_backend_finish_dynamic_sections, 753*a9fa9459Szrj elf_backend_begin_write_processing, 754*a9fa9459Szrj elf_backend_final_write_processing, 755*a9fa9459Szrj elf_backend_additional_program_headers, 756*a9fa9459Szrj elf_backend_modify_segment_map, 757*a9fa9459Szrj elf_backend_modify_program_headers, 758*a9fa9459Szrj elf_backend_gc_keep, 759*a9fa9459Szrj elf_backend_gc_mark_dynamic_ref, 760*a9fa9459Szrj elf_backend_gc_mark_hook, 761*a9fa9459Szrj elf_backend_gc_mark_extra_sections, 762*a9fa9459Szrj elf_backend_gc_sweep_hook, 763*a9fa9459Szrj elf_backend_post_process_headers, 764*a9fa9459Szrj elf_backend_print_symbol_all, 765*a9fa9459Szrj elf_backend_output_arch_local_syms, 766*a9fa9459Szrj elf_backend_output_arch_syms, 767*a9fa9459Szrj elf_backend_copy_indirect_symbol, 768*a9fa9459Szrj elf_backend_hide_symbol, 769*a9fa9459Szrj elf_backend_fixup_symbol, 770*a9fa9459Szrj elf_backend_merge_symbol_attribute, 771*a9fa9459Szrj elf_backend_get_target_dtag, 772*a9fa9459Szrj elf_backend_ignore_undef_symbol, 773*a9fa9459Szrj elf_backend_emit_relocs, 774*a9fa9459Szrj elf_backend_count_relocs, 775*a9fa9459Szrj elf_backend_count_additional_relocs, 776*a9fa9459Szrj elf_backend_sort_relocs_p, 777*a9fa9459Szrj elf_backend_grok_prstatus, 778*a9fa9459Szrj elf_backend_grok_psinfo, 779*a9fa9459Szrj elf_backend_write_core_note, 780*a9fa9459Szrj elf_backend_lookup_section_flags_hook, 781*a9fa9459Szrj elf_backend_reloc_type_class, 782*a9fa9459Szrj elf_backend_discard_info, 783*a9fa9459Szrj elf_backend_ignore_discarded_relocs, 784*a9fa9459Szrj elf_backend_action_discarded, 785*a9fa9459Szrj elf_backend_eh_frame_address_size, 786*a9fa9459Szrj elf_backend_can_make_relative_eh_frame, 787*a9fa9459Szrj elf_backend_can_make_lsda_relative_eh_frame, 788*a9fa9459Szrj elf_backend_encode_eh_address, 789*a9fa9459Szrj elf_backend_write_section, 790*a9fa9459Szrj elf_backend_mips_irix_compat, 791*a9fa9459Szrj elf_backend_mips_rtype_to_howto, 792*a9fa9459Szrj elf_backend_ecoff_debug_swap, 793*a9fa9459Szrj elf_backend_bfd_from_remote_memory, 794*a9fa9459Szrj elf_backend_plt_sym_val, 795*a9fa9459Szrj elf_backend_common_definition, 796*a9fa9459Szrj elf_backend_common_section_index, 797*a9fa9459Szrj elf_backend_common_section, 798*a9fa9459Szrj elf_backend_merge_symbol, 799*a9fa9459Szrj elf_backend_hash_symbol, 800*a9fa9459Szrj elf_backend_is_function_type, 801*a9fa9459Szrj elf_backend_maybe_function_sym, 802*a9fa9459Szrj elf_backend_get_reloc_section, 803*a9fa9459Szrj elf_backend_copy_special_section_fields, 804*a9fa9459Szrj elf_backend_link_order_error_handler, 805*a9fa9459Szrj elf_backend_relplt_name, 806*a9fa9459Szrj ELF_MACHINE_ALT1, 807*a9fa9459Szrj ELF_MACHINE_ALT2, 808*a9fa9459Szrj &elf_backend_size_info, 809*a9fa9459Szrj elf_backend_special_sections, 810*a9fa9459Szrj elf_backend_got_header_size, 811*a9fa9459Szrj elf_backend_got_elt_size, 812*a9fa9459Szrj elf_backend_obj_attrs_vendor, 813*a9fa9459Szrj elf_backend_obj_attrs_section, 814*a9fa9459Szrj elf_backend_obj_attrs_arg_type, 815*a9fa9459Szrj elf_backend_obj_attrs_section_type, 816*a9fa9459Szrj elf_backend_obj_attrs_order, 817*a9fa9459Szrj elf_backend_obj_attrs_handle_unknown, 818*a9fa9459Szrj elf_backend_compact_eh_encoding, 819*a9fa9459Szrj elf_backend_cant_unwind_opcode, 820*a9fa9459Szrj elf_backend_static_tls_alignment, 821*a9fa9459Szrj elf_backend_stack_align, 822*a9fa9459Szrj elf_backend_strtab_flags, 823*a9fa9459Szrj elf_backend_collect, 824*a9fa9459Szrj elf_backend_type_change_ok, 825*a9fa9459Szrj elf_backend_may_use_rel_p, 826*a9fa9459Szrj elf_backend_may_use_rela_p, 827*a9fa9459Szrj elf_backend_default_use_rela_p, 828*a9fa9459Szrj elf_backend_rela_plts_and_copies_p, 829*a9fa9459Szrj elf_backend_rela_normal, 830*a9fa9459Szrj elf_backend_sign_extend_vma, 831*a9fa9459Szrj elf_backend_want_got_plt, 832*a9fa9459Szrj elf_backend_plt_readonly, 833*a9fa9459Szrj elf_backend_want_plt_sym, 834*a9fa9459Szrj elf_backend_plt_not_loaded, 835*a9fa9459Szrj elf_backend_plt_alignment, 836*a9fa9459Szrj elf_backend_can_gc_sections, 837*a9fa9459Szrj elf_backend_can_refcount, 838*a9fa9459Szrj elf_backend_want_got_sym, 839*a9fa9459Szrj elf_backend_want_dynbss, 840*a9fa9459Szrj elf_backend_want_p_paddr_set_to_zero, 841*a9fa9459Szrj elf_backend_default_execstack, 842*a9fa9459Szrj elf_backend_caches_rawsize, 843*a9fa9459Szrj elf_backend_extern_protected_data 844*a9fa9459Szrj }; 845*a9fa9459Szrj 846*a9fa9459Szrj /* Forward declaration for use when initialising alternative_target field. */ 847*a9fa9459Szrj #ifdef TARGET_LITTLE_SYM 848*a9fa9459Szrj extern const bfd_target TARGET_LITTLE_SYM; 849*a9fa9459Szrj #endif 850*a9fa9459Szrj 851*a9fa9459Szrj #ifdef TARGET_BIG_SYM 852*a9fa9459Szrj const bfd_target TARGET_BIG_SYM = 853*a9fa9459Szrj { 854*a9fa9459Szrj /* name: identify kind of target */ 855*a9fa9459Szrj TARGET_BIG_NAME, 856*a9fa9459Szrj 857*a9fa9459Szrj /* flavour: general indication about file */ 858*a9fa9459Szrj bfd_target_elf_flavour, 859*a9fa9459Szrj 860*a9fa9459Szrj /* byteorder: data is big endian */ 861*a9fa9459Szrj BFD_ENDIAN_BIG, 862*a9fa9459Szrj 863*a9fa9459Szrj /* header_byteorder: header is also big endian */ 864*a9fa9459Szrj BFD_ENDIAN_BIG, 865*a9fa9459Szrj 866*a9fa9459Szrj /* object_flags: mask of all file flags */ 867*a9fa9459Szrj (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS 868*a9fa9459Szrj | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS 869*a9fa9459Szrj | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON), 870*a9fa9459Szrj 871*a9fa9459Szrj /* section_flags: mask of all section flags */ 872*a9fa9459Szrj (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY 873*a9fa9459Szrj | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES 874*a9fa9459Szrj | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), 875*a9fa9459Szrj 876*a9fa9459Szrj /* leading_symbol_char: is the first char of a user symbol 877*a9fa9459Szrj predictable, and if so what is it */ 878*a9fa9459Szrj elf_symbol_leading_char, 879*a9fa9459Szrj 880*a9fa9459Szrj /* ar_pad_char: pad character for filenames within an archive header 881*a9fa9459Szrj FIXME: this really has nothing to do with ELF, this is a characteristic 882*a9fa9459Szrj of the archiver and/or os and should be independently tunable */ 883*a9fa9459Szrj '/', 884*a9fa9459Szrj 885*a9fa9459Szrj /* ar_max_namelen: maximum number of characters in an archive header 886*a9fa9459Szrj FIXME: this really has nothing to do with ELF, this is a characteristic 887*a9fa9459Szrj of the archiver and should be independently tunable. The System V ABI, 888*a9fa9459Szrj Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ 889*a9fa9459Szrj 15, 890*a9fa9459Szrj 891*a9fa9459Szrj elf_match_priority, 892*a9fa9459Szrj 893*a9fa9459Szrj /* Routines to byte-swap various sized integers from the data sections */ 894*a9fa9459Szrj bfd_getb64, bfd_getb_signed_64, bfd_putb64, 895*a9fa9459Szrj bfd_getb32, bfd_getb_signed_32, bfd_putb32, 896*a9fa9459Szrj bfd_getb16, bfd_getb_signed_16, bfd_putb16, 897*a9fa9459Szrj 898*a9fa9459Szrj /* Routines to byte-swap various sized integers from the file headers */ 899*a9fa9459Szrj bfd_getb64, bfd_getb_signed_64, bfd_putb64, 900*a9fa9459Szrj bfd_getb32, bfd_getb_signed_32, bfd_putb32, 901*a9fa9459Szrj bfd_getb16, bfd_getb_signed_16, bfd_putb16, 902*a9fa9459Szrj 903*a9fa9459Szrj /* bfd_check_format: check the format of a file being read */ 904*a9fa9459Szrj { _bfd_dummy_target, /* unknown format */ 905*a9fa9459Szrj bfd_elfNN_object_p, /* assembler/linker output (object file) */ 906*a9fa9459Szrj bfd_elfNN_archive_p, /* an archive */ 907*a9fa9459Szrj bfd_elfNN_core_file_p /* a core file */ 908*a9fa9459Szrj }, 909*a9fa9459Szrj 910*a9fa9459Szrj /* bfd_set_format: set the format of a file being written */ 911*a9fa9459Szrj { bfd_false, 912*a9fa9459Szrj bfd_elfNN_mkobject, 913*a9fa9459Szrj bfd_elfNN_mkarchive, 914*a9fa9459Szrj bfd_elfNN_mkcorefile 915*a9fa9459Szrj }, 916*a9fa9459Szrj 917*a9fa9459Szrj /* bfd_write_contents: write cached information into a file being written */ 918*a9fa9459Szrj { bfd_false, 919*a9fa9459Szrj bfd_elfNN_write_object_contents, 920*a9fa9459Szrj bfd_elfNN_write_archive_contents, 921*a9fa9459Szrj bfd_elfNN_write_corefile_contents, 922*a9fa9459Szrj }, 923*a9fa9459Szrj 924*a9fa9459Szrj BFD_JUMP_TABLE_GENERIC (bfd_elfNN), 925*a9fa9459Szrj BFD_JUMP_TABLE_COPY (bfd_elfNN), 926*a9fa9459Szrj BFD_JUMP_TABLE_CORE (bfd_elfNN), 927*a9fa9459Szrj #ifdef bfd_elfNN_archive_functions 928*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), 929*a9fa9459Szrj #elif defined USE_64_BIT_ARCHIVE 930*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit), 931*a9fa9459Szrj #else 932*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), 933*a9fa9459Szrj #endif 934*a9fa9459Szrj BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), 935*a9fa9459Szrj BFD_JUMP_TABLE_RELOCS (bfd_elfNN), 936*a9fa9459Szrj BFD_JUMP_TABLE_WRITE (bfd_elfNN), 937*a9fa9459Szrj BFD_JUMP_TABLE_LINK (bfd_elfNN), 938*a9fa9459Szrj BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), 939*a9fa9459Szrj 940*a9fa9459Szrj /* Alternative endian target. */ 941*a9fa9459Szrj #ifdef TARGET_LITTLE_SYM 942*a9fa9459Szrj & TARGET_LITTLE_SYM, 943*a9fa9459Szrj #else 944*a9fa9459Szrj NULL, 945*a9fa9459Szrj #endif 946*a9fa9459Szrj 947*a9fa9459Szrj /* backend_data: */ 948*a9fa9459Szrj &elfNN_bed 949*a9fa9459Szrj }; 950*a9fa9459Szrj #endif 951*a9fa9459Szrj 952*a9fa9459Szrj #ifdef TARGET_LITTLE_SYM 953*a9fa9459Szrj const bfd_target TARGET_LITTLE_SYM = 954*a9fa9459Szrj { 955*a9fa9459Szrj /* name: identify kind of target */ 956*a9fa9459Szrj TARGET_LITTLE_NAME, 957*a9fa9459Szrj 958*a9fa9459Szrj /* flavour: general indication about file */ 959*a9fa9459Szrj bfd_target_elf_flavour, 960*a9fa9459Szrj 961*a9fa9459Szrj /* byteorder: data is little endian */ 962*a9fa9459Szrj BFD_ENDIAN_LITTLE, 963*a9fa9459Szrj 964*a9fa9459Szrj /* header_byteorder: header is also little endian */ 965*a9fa9459Szrj BFD_ENDIAN_LITTLE, 966*a9fa9459Szrj 967*a9fa9459Szrj /* object_flags: mask of all file flags */ 968*a9fa9459Szrj (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS 969*a9fa9459Szrj | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS 970*a9fa9459Szrj | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON), 971*a9fa9459Szrj 972*a9fa9459Szrj /* section_flags: mask of all section flags */ 973*a9fa9459Szrj (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY 974*a9fa9459Szrj | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES 975*a9fa9459Szrj | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), 976*a9fa9459Szrj 977*a9fa9459Szrj /* leading_symbol_char: is the first char of a user symbol 978*a9fa9459Szrj predictable, and if so what is it */ 979*a9fa9459Szrj elf_symbol_leading_char, 980*a9fa9459Szrj 981*a9fa9459Szrj /* ar_pad_char: pad character for filenames within an archive header 982*a9fa9459Szrj FIXME: this really has nothing to do with ELF, this is a characteristic 983*a9fa9459Szrj of the archiver and/or os and should be independently tunable */ 984*a9fa9459Szrj '/', 985*a9fa9459Szrj 986*a9fa9459Szrj /* ar_max_namelen: maximum number of characters in an archive header 987*a9fa9459Szrj FIXME: this really has nothing to do with ELF, this is a characteristic 988*a9fa9459Szrj of the archiver and should be independently tunable. The System V ABI, 989*a9fa9459Szrj Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ 990*a9fa9459Szrj 15, 991*a9fa9459Szrj 992*a9fa9459Szrj elf_match_priority, 993*a9fa9459Szrj 994*a9fa9459Szrj /* Routines to byte-swap various sized integers from the data sections */ 995*a9fa9459Szrj bfd_getl64, bfd_getl_signed_64, bfd_putl64, 996*a9fa9459Szrj bfd_getl32, bfd_getl_signed_32, bfd_putl32, 997*a9fa9459Szrj bfd_getl16, bfd_getl_signed_16, bfd_putl16, 998*a9fa9459Szrj 999*a9fa9459Szrj /* Routines to byte-swap various sized integers from the file headers */ 1000*a9fa9459Szrj bfd_getl64, bfd_getl_signed_64, bfd_putl64, 1001*a9fa9459Szrj bfd_getl32, bfd_getl_signed_32, bfd_putl32, 1002*a9fa9459Szrj bfd_getl16, bfd_getl_signed_16, bfd_putl16, 1003*a9fa9459Szrj 1004*a9fa9459Szrj /* bfd_check_format: check the format of a file being read */ 1005*a9fa9459Szrj { _bfd_dummy_target, /* unknown format */ 1006*a9fa9459Szrj bfd_elfNN_object_p, /* assembler/linker output (object file) */ 1007*a9fa9459Szrj bfd_elfNN_archive_p, /* an archive */ 1008*a9fa9459Szrj bfd_elfNN_core_file_p /* a core file */ 1009*a9fa9459Szrj }, 1010*a9fa9459Szrj 1011*a9fa9459Szrj /* bfd_set_format: set the format of a file being written */ 1012*a9fa9459Szrj { bfd_false, 1013*a9fa9459Szrj bfd_elfNN_mkobject, 1014*a9fa9459Szrj bfd_elfNN_mkarchive, 1015*a9fa9459Szrj bfd_elfNN_mkcorefile 1016*a9fa9459Szrj }, 1017*a9fa9459Szrj 1018*a9fa9459Szrj /* bfd_write_contents: write cached information into a file being written */ 1019*a9fa9459Szrj { bfd_false, 1020*a9fa9459Szrj bfd_elfNN_write_object_contents, 1021*a9fa9459Szrj bfd_elfNN_write_archive_contents, 1022*a9fa9459Szrj bfd_elfNN_write_corefile_contents, 1023*a9fa9459Szrj }, 1024*a9fa9459Szrj 1025*a9fa9459Szrj BFD_JUMP_TABLE_GENERIC (bfd_elfNN), 1026*a9fa9459Szrj BFD_JUMP_TABLE_COPY (bfd_elfNN), 1027*a9fa9459Szrj BFD_JUMP_TABLE_CORE (bfd_elfNN), 1028*a9fa9459Szrj #ifdef bfd_elfNN_archive_functions 1029*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), 1030*a9fa9459Szrj #elif defined USE_64_BIT_ARCHIVE 1031*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_64_bit), 1032*a9fa9459Szrj #else 1033*a9fa9459Szrj BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), 1034*a9fa9459Szrj #endif 1035*a9fa9459Szrj BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), 1036*a9fa9459Szrj BFD_JUMP_TABLE_RELOCS (bfd_elfNN), 1037*a9fa9459Szrj BFD_JUMP_TABLE_WRITE (bfd_elfNN), 1038*a9fa9459Szrj BFD_JUMP_TABLE_LINK (bfd_elfNN), 1039*a9fa9459Szrj BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), 1040*a9fa9459Szrj 1041*a9fa9459Szrj /* Alternative endian target. */ 1042*a9fa9459Szrj #ifdef TARGET_BIG_SYM 1043*a9fa9459Szrj & TARGET_BIG_SYM, 1044*a9fa9459Szrj #else 1045*a9fa9459Szrj NULL, 1046*a9fa9459Szrj #endif 1047*a9fa9459Szrj 1048*a9fa9459Szrj /* backend_data: */ 1049*a9fa9459Szrj &elfNN_bed 1050*a9fa9459Szrj }; 1051*a9fa9459Szrj #endif 1052