[PATCH] Better merging of CIEs in .eh_frame optimizations

Alan Modra amodra@bigpond.net.au
Tue Nov 21 06:14:00 GMT 2006


On Thu, Nov 16, 2006 at 02:44:04PM +0100, Jakub Jelinek wrote:
> 2006-11-15  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* 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.

Looks OK to commit, with a small fix.

> @@ -182,10 +206,14 @@ write_value (bfd *abfd, bfd_byte *buf, b
>  
>  /* Return zero if C1 and C2 CIEs can be merged.  */

s/zero/one/

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list