X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bfd%2Felf-bfd.h;h=c91af27639e8bdf8aa075ce4715cea78b9fb59be;hb=ca92cecbbead0c883df57e70fdb5b2541febd43b;hp=f7b020d964953c8330dfafd6076faaecb9408efd;hpb=13285a1b2c20277cb2346e9c635c5ea7019441ad;p=binutils-gdb.git diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index f7b020d9649..c91af27639e 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -264,14 +264,32 @@ struct elf_link_loaded_list /* Structures used by the eh_frame optimization code. */ struct eh_cie_fde { - /* For FDEs, this points to the CIE used. */ - struct eh_cie_fde *cie_inf; + union { + struct { + /* If REMOVED == 1, this is the CIE that the FDE originally used. + The CIE belongs to the same .eh_frame input section as the FDE. + + If REMOVED == 0, this is the CIE that we have chosen to use for + the output FDE. The CIE's REMOVED field is also 0, but the CIE + might belong to a different .eh_frame input section from the FDE. */ + struct eh_cie_fde *cie_inf; + } fde; + struct { + /* In general, equivalent CIEs are grouped together, with one CIE + representing all the others in a group. If REMOVED == 0, + this CIE is the group representative. If REMOVED == 1, + following this pointer brings us "closer" to the CIE's group + representative, and reapplying always gives the representative. */ + struct eh_cie_fde *merged; + } cie; + } u; + unsigned int reloc_index; unsigned int size; unsigned int offset; unsigned int new_offset; - unsigned char fde_encoding; - unsigned char lsda_encoding; - unsigned char lsda_offset; + unsigned int fde_encoding : 8; + unsigned int lsda_encoding : 8; + unsigned int lsda_offset : 8; unsigned int cie : 1; unsigned int removed : 1; unsigned int add_augmentation_size : 1; @@ -303,6 +321,8 @@ struct eh_frame_hdr_info asection *hdr_sec; unsigned int fde_count, array_count; struct eh_frame_array_ent *array; + /* TRUE if all .eh_frames have been parsd. */ + bfd_boolean parsed_eh_frames; /* TRUE if .eh_frame_hdr should contain the sorted search table. We build it if we successfully read all .eh_frame input sections and recognize them. */ @@ -1718,6 +1738,13 @@ extern bfd_boolean _bfd_elf_strtab_emit extern void _bfd_elf_strtab_finalize (struct elf_strtab_hash *); +extern void _bfd_elf_begin_eh_frame_parsing + (struct bfd_link_info *info); +extern void _bfd_elf_parse_eh_frame + (bfd *, struct bfd_link_info *, asection *, struct elf_reloc_cookie *); +extern void _bfd_elf_end_eh_frame_parsing + (struct bfd_link_info *info); + extern bfd_boolean _bfd_elf_discard_section_eh_frame (bfd *, struct bfd_link_info *, asection *, bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *); @@ -1814,10 +1841,7 @@ extern bfd_boolean _bfd_elf_dynamic_symbol_p extern bfd_boolean _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean); -extern bfd_boolean bfd_elf_match_symbols_in_sections - (asection *, asection *, struct bfd_link_info *); - -extern void bfd_elf_perform_complex_relocation +extern bfd_reloc_status_type bfd_elf_perform_complex_relocation (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma); extern bfd_boolean _bfd_elf_setup_sections @@ -1974,10 +1998,16 @@ extern asection *_bfd_elf_gc_mark_hook (asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *); +extern asection *_bfd_elf_gc_mark_rsec + (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn, + struct elf_reloc_cookie *); + +extern bfd_boolean _bfd_elf_gc_mark_reloc + (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn, + struct elf_reloc_cookie *, bfd_boolean); + extern bfd_boolean _bfd_elf_gc_mark - (struct bfd_link_info *, asection *, - asection * (*) (asection *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)); + (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn); extern bfd_boolean bfd_elf_gc_common_finalize_got_offsets (bfd *, struct bfd_link_info *); @@ -2009,6 +2039,8 @@ extern char *elfcore_write_prfpreg (bfd *, char *, int *, const void *, int); extern char *elfcore_write_prxfpreg (bfd *, char *, int *, const void *, int); +extern char *elfcore_write_ppc_vmx + (bfd *, char *, int *, const void *, int); extern char *elfcore_write_lwpstatus (bfd *, char *, int *, long, int, const void *);