From bce613b9bfac3b56f4f9742776db11aeec875300 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Nov 2006 11:25:17 +0000 Subject: * elf-eh-frame.c (struct cie): New type. (cie_compare): Removed. (cie_eq, cie_hash, cie_compute_hash): New functions. (_bfd_elf_discard_section_eh_frame): Rewrite not to rely on FDEs pointing only to last CIE and allow merging of any duplicate CIEs, not just duplicate consecutive CIEs. (_bfd_elf_discard_section_eh_frame_hdr): Delete cies hash table. * elf-bfd.h (struct cie_header, struct cie): Removed. (struct eh_frame_sec_info): Remove alloced field. (struct eh_frame_hdr_info): Remove last_cie, last_cie_sec and last_cie_inf fields. Add cies field. * ld-elf/eh5.d: New test. * ld-elf/eh5.s: New file. * ld-elf/eh5a.s: New file. * ld-elf/eh5b.s: New file. --- bfd/elf-bfd.h | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 4a7c0c8..80aa23e 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -261,31 +261,6 @@ struct elf_link_loaded_list }; /* Structures used by the eh_frame optimization code. */ -struct cie_header -{ - unsigned int length; - unsigned int id; -}; - -struct cie -{ - struct cie_header hdr; - unsigned char version; - char augmentation[20]; - bfd_vma code_align; - bfd_signed_vma data_align; - bfd_vma ra_column; - bfd_vma augmentation_size; - struct elf_link_hash_entry *personality; - unsigned char per_encoding; - unsigned char lsda_encoding; - unsigned char fde_encoding; - unsigned char initial_insn_length; - unsigned char make_relative; - unsigned char make_lsda_relative; - unsigned char initial_instructions[50]; -}; - struct eh_cie_fde { /* For FDEs, this points to the CIE used. */ @@ -310,7 +285,6 @@ struct eh_cie_fde struct eh_frame_sec_info { unsigned int count; - unsigned int alloced; struct eh_cie_fde entry[1]; }; @@ -320,11 +294,11 @@ struct eh_frame_array_ent bfd_vma fde; }; +struct htab; + struct eh_frame_hdr_info { - struct cie last_cie; - asection *last_cie_sec; - struct eh_cie_fde *last_cie_inf; + struct htab *cies; asection *hdr_sec; unsigned int fde_count, array_count; struct eh_frame_array_ent *array; -- cgit v1.1