[patch ld bfd gas]: Handle linkonce for cfi generated debug_frame and eh_frame data
H.J. Lu
hjl.tools@gmail.com
Mon Apr 18 12:43:00 GMT 2011
On Mon, Apr 18, 2011 at 2:33 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hello,
>
> The recent patch about this subject I withdraw and replace it by the
> more enhanced version. I noticed that a bit more checkings and a
> different approach on writing eh_frame/debug_frame sections out, was
> necessary. Additionally this patch allows for PE-COFF targets, that
> debugging sections can have link-once flags active.
>
>
> ChangeLog bfd/
>
> 2011-04-18 Kai Tietz
>
> * coffcode.h (sec_to_styp_flags): Allow linkonce for
> debugging sections.
>
> ChangeLog gas/
>
> 2011-04-18 Kai Tietz
>
> * dw2gencfi.c (dwcfi_seg_list): New struct.
> (dwcfi_hash): New static hash variable.
> (get_debugseg_name): New.
> (alloc_debugseg_item): New.
> (make_debug_seg): New.
> (dwcfi_hash_insert): New.
> (dwcfi_hash_find): New.
> (dwcfi_hash_find_or_make): New.
> (cfi_insn_data): New member cur_seg.
> (cie_entry): Likewise.
> (fde_entry): New cseg and handled members.
> (alloc_fde_entry): Initialize cseg member.
> (alloc_cfi_insn_data): Initialize cur_seg member.
> (dot_cfi_sections): Compare for beginning of
> section names via strncmp.
> (get_cfi_seg): New.
> (cfi_finish): Treat link-once sections.
> (is_now_linkonce_segment): New local helper.
> (output_cie): Ignore cie entries not member of current
> segment.
> (output_fde): Likewise.
> (select_cie_for_fde): Likewise.
> (cfi_change_reg_numbers): Add new argument for current segment
> and ignore insn elements, if not part of current segment.
> * ehopt.c (get_cie_info): Use strncmp for
> section name matching.
> (heck_eh_frame): Likewise.
>
> ChangeLog ld/
>
> 2011-04-18 Kai Tietz
>
> * scripttempl/alphavms.sc: Handle .eh_frame($|.)* sections.
> * scripttempl/armbpabi.sc: Likewise.
> * scripttempl/avr.sc: Likewise.
> * scripttempl/crisaout.sc: Likewise.
> * scripttempl/elf.sc: Likewise.
> * scripttempl/elf32cr16.sc: Likewise.
> * scripttempl/elf32crx.sc: Likewise.
> * scripttempl/elf32msp430.sc: Likewise.
> * scripttempl/elf32msp430_3.sc: Likewise.
> * scripttempl/elf32sh-symbian.sc: Likewise.
> * scripttempl/elf64hppa.sc: Likewise.
> * scripttempl/elf_chaos.sc: Likewise.
> * scripttempl/elfd10v.sc: Likewise.
> * scripttempl/elfd30v.sc: Likewise.
> * scripttempl/elfi370.sc: Likewise.
> * scripttempl/elfm68hc11.sc: Likewise.
> * scripttempl/elfm68hc12.sc: Likewise.
> * scripttempl/elfmicroblaze.sc: Likewise.
> * scripttempl/elfxtensa.sc: Likewise.
> * scripttempl/epocpe.sc: Likewise.
> * scripttempl/i386beos.sc: Likewise.
> * scripttempl/i386go32.sc: Likewise.
> * scripttempl/ip2k.sc: Likewise.
> * scripttempl/iq2000.sc: Likewise.
> * scripttempl/mcorepe.sc: Likewise.
> * scripttempl/mep.sc: Likewise.
> * scripttempl/mmo.sc: Likewise.
> * scripttempl/pe.sc: Likewise.
> * scripttempl/pep.sc: Likewise.
> * scripttempl/v850.sc: Likewise.
> * scripttempl/xstormy16.sc: Likewise.
>
> Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
> Ok for apply?
2 comments:
1. You should test Linux/x86 since you change ELF targets.
2. You should add some testcases to show gas/ld work correctly.
--
H.J.
More information about the Binutils
mailing list