mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
c7b8f16e18
* bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11 instruction scanning should be done. (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan) (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes. (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to prototype. * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info argument. * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME) (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros. (elf32_vfp11_erratum_type): New enum. (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to veneers. (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist. (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size, vfp11_fix and num_vfp11_fixes fields. (elf32_arm_link_hash_table_create): Initialise vfp11_fix, vfp11_erratum_glue_size, num_vfp11_fixes fields. (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer. (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum glue section. (elf32_arm_section_map_add): Add an code/data mapping symbol entry to a section's map. (record_vfp11_erratum_veneer): Create a single veneer, and its associated symbols. (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue. (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input BFDs. (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround required. (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes. (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn. (bfd_arm_vfp11_write_mask): Update write mask according to coded register number. (bfd_arm_vfp11_antidependency): New function. (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn. (elf32_arm_compare_mapping): Declare. (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input BFD for potential erratum-triggering insns. Record results. (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers and branches to veneers have been placed in virtual memory after layout. (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global hash table. (elf32_arm_output_symbol_hook): Remove. (elf32_arm_write_section): Output veneers, and branches to veneers. Use maps from input sections, not output sections, for code byte-swapping. * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument. * elf32-score.c (_bfd_score_elf_write_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise. * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
154 lines
7.0 KiB
C
154 lines
7.0 KiB
C
/* MIPS ELF specific backend routines.
|
|
Copyright 2002, 2003, 2004, 2005, 2006
|
|
Free Software Foundation, Inc.
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
|
|
#include "elf/common.h"
|
|
#include "elf/internal.h"
|
|
|
|
extern bfd_boolean _bfd_mips_elf_new_section_hook
|
|
(bfd *, asection *);
|
|
extern void _bfd_mips_elf_symbol_processing
|
|
(bfd *, asymbol *);
|
|
extern unsigned int _bfd_mips_elf_eh_frame_address_size
|
|
(bfd *, asection *);
|
|
extern bfd_boolean _bfd_mips_elf_name_local_section_symbols
|
|
(bfd *);
|
|
extern bfd_boolean _bfd_mips_elf_section_processing
|
|
(bfd *, Elf_Internal_Shdr *);
|
|
extern bfd_boolean _bfd_mips_elf_section_from_shdr
|
|
(bfd *, Elf_Internal_Shdr *, const char *, int);
|
|
extern bfd_boolean _bfd_mips_elf_fake_sections
|
|
(bfd *, Elf_Internal_Shdr *, asection *);
|
|
extern bfd_boolean _bfd_mips_elf_section_from_bfd_section
|
|
(bfd *, asection *, int *);
|
|
extern bfd_boolean _bfd_mips_elf_add_symbol_hook
|
|
(bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
|
|
const char **, flagword *, asection **, bfd_vma *);
|
|
extern bfd_boolean _bfd_mips_elf_link_output_symbol_hook
|
|
(struct bfd_link_info *, const char *, Elf_Internal_Sym *,
|
|
asection *, struct elf_link_hash_entry *);
|
|
extern bfd_boolean _bfd_mips_elf_create_dynamic_sections
|
|
(bfd *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_check_relocs
|
|
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
|
extern bfd_boolean _bfd_mips_elf_adjust_dynamic_symbol
|
|
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
|
extern bfd_boolean _bfd_mips_vxworks_adjust_dynamic_symbol
|
|
(struct bfd_link_info *, struct elf_link_hash_entry *);
|
|
extern bfd_boolean _bfd_mips_elf_always_size_sections
|
|
(bfd *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_size_dynamic_sections
|
|
(bfd *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_relocate_section
|
|
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
|
|
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
|
|
extern bfd_boolean _bfd_mips_elf_finish_dynamic_symbol
|
|
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
|
|
Elf_Internal_Sym *);
|
|
extern bfd_boolean _bfd_mips_vxworks_finish_dynamic_symbol
|
|
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
|
|
Elf_Internal_Sym *);
|
|
extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections
|
|
(bfd *, struct bfd_link_info *);
|
|
extern void _bfd_mips_elf_final_write_processing
|
|
(bfd *, bfd_boolean);
|
|
extern int _bfd_mips_elf_additional_program_headers
|
|
(bfd *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_modify_segment_map
|
|
(bfd *, struct bfd_link_info *);
|
|
extern asection * _bfd_mips_elf_gc_mark_hook
|
|
(asection *, struct bfd_link_info *, Elf_Internal_Rela *,
|
|
struct elf_link_hash_entry *, Elf_Internal_Sym *);
|
|
extern bfd_boolean _bfd_mips_elf_gc_sweep_hook
|
|
(bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
|
|
extern void _bfd_mips_elf_copy_indirect_symbol
|
|
(struct bfd_link_info *, struct elf_link_hash_entry *,
|
|
struct elf_link_hash_entry *);
|
|
extern void _bfd_mips_elf_hide_symbol
|
|
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
|
|
extern bfd_boolean _bfd_mips_elf_ignore_discarded_relocs
|
|
(asection *);
|
|
extern bfd_boolean _bfd_mips_elf_find_nearest_line
|
|
(bfd *, asection *, asymbol **, bfd_vma, const char **,
|
|
const char **, unsigned int *);
|
|
extern bfd_boolean _bfd_mips_elf_find_inliner_info
|
|
(bfd *, const char **, const char **, unsigned int *);
|
|
extern bfd_boolean _bfd_mips_elf_set_section_contents
|
|
(bfd *, asection *, const void *, file_ptr, bfd_size_type);
|
|
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
|
|
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
|
bfd_byte *, bfd_boolean, asymbol **);
|
|
extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
|
|
(bfd *);
|
|
extern struct bfd_link_hash_table *_bfd_mips_vxworks_link_hash_table_create
|
|
(bfd *);
|
|
extern bfd_boolean _bfd_mips_elf_final_link
|
|
(bfd *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_merge_private_bfd_data
|
|
(bfd *, bfd *);
|
|
extern bfd_boolean _bfd_mips_elf_set_private_flags
|
|
(bfd *, flagword);
|
|
extern bfd_boolean _bfd_mips_elf_print_private_bfd_data
|
|
(bfd *, void *);
|
|
extern bfd_boolean _bfd_mips_elf_discard_info
|
|
(bfd *, struct elf_reloc_cookie *, struct bfd_link_info *);
|
|
extern bfd_boolean _bfd_mips_elf_write_section
|
|
(bfd *, struct bfd_link_info *, asection *, bfd_byte *);
|
|
|
|
extern bfd_boolean _bfd_mips_elf_read_ecoff_info
|
|
(bfd *, asection *, struct ecoff_debug_info *);
|
|
extern void _bfd_mips16_elf_reloc_unshuffle
|
|
(bfd *, int, bfd_boolean, bfd_byte *);
|
|
extern void _bfd_mips16_elf_reloc_shuffle
|
|
(bfd *, int, bfd_boolean, bfd_byte *);
|
|
extern bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp
|
|
(bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma);
|
|
extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc
|
|
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
|
extern bfd_reloc_status_type _bfd_mips_elf_hi16_reloc
|
|
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
|
extern bfd_reloc_status_type _bfd_mips_elf_got16_reloc
|
|
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
|
extern bfd_reloc_status_type _bfd_mips_elf_lo16_reloc
|
|
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
|
extern bfd_reloc_status_type _bfd_mips_elf_generic_reloc
|
|
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
|
|
extern unsigned long _bfd_elf_mips_mach
|
|
(flagword);
|
|
extern bfd_boolean _bfd_mips_relax_section
|
|
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
|
|
extern bfd_vma _bfd_mips_elf_sign_extend
|
|
(bfd_vma, int);
|
|
extern void _bfd_mips_elf_merge_symbol_attribute
|
|
(struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean, bfd_boolean);
|
|
extern bfd_boolean _bfd_mips_elf_ignore_undef_symbol
|
|
(struct elf_link_hash_entry *);
|
|
|
|
extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections [];
|
|
|
|
extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *);
|
|
|
|
#define elf_backend_common_definition _bfd_mips_elf_common_definition
|
|
#define elf_backend_name_local_section_symbols \
|
|
_bfd_mips_elf_name_local_section_symbols
|
|
#define elf_backend_special_sections _bfd_mips_elf_special_sections
|
|
#define elf_backend_eh_frame_address_size _bfd_mips_elf_eh_frame_address_size
|
|
#define elf_backend_merge_symbol_attribute _bfd_mips_elf_merge_symbol_attribute
|
|
#define elf_backend_ignore_undef_symbol _bfd_mips_elf_ignore_undef_symbol
|