From: Jakub Jelinek Date: Mon, 27 Feb 2006 23:07:06 +0000 (+0000) Subject: bfd/ X-Git-Tag: binutils-csl-2_17-branchpoint~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63752a757f91daffcdfd0ee426067d770955e47d;p=external%2Fbinutils.git bfd/ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag. (_bfd_elf_write_section_eh_frame): Likewise. gas/ * dw2gencfi.c (struct fde_entry, struct cie_entry): Add signal_frame field. (CFI_signal_frame): Define. (cfi_pseudo_table): Add .cfi_signal_frame. (dot_cfi): Handle CFI_signal_frame. (output_cie): Handle cie->signal_frame. (select_cie_for_fde): Don't share CIE if signal_frame flag is different. Copy signal_frame from FDE to newly created CIE. * doc/as.texinfo: Document .cfi_signal_frame. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a22a384..cba1640 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-02-27 Jakub Jelinek + + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag. + (_bfd_elf_write_section_eh_frame): Likewise. + 2006-02-27 Carlos O'Donell * po/Make-in: Add html target. diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index d5041d0..ab0b995 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -1,5 +1,5 @@ /* .eh_frame section optimization. - Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Written by Jakub Jelinek . This file is part of BFD, the Binary File Descriptor library. @@ -613,6 +613,8 @@ _bfd_elf_discard_section_eh_frame ENSURE_NO_RELOCS (buf); REQUIRE (get_DW_EH_PE_width (cie.fde_encoding, ptr_size)); break; + case 'S': + break; case 'P': { int per_width; @@ -1178,6 +1180,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, } buf++; break; + case 'S': + break; default: BFD_FAIL (); } diff --git a/gas/ChangeLog b/gas/ChangeLog index ff194bb..f4d28ef 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,15 @@ +2006-02-27 Jakub Jelinek + + * dw2gencfi.c (struct fde_entry, struct cie_entry): Add signal_frame + field. + (CFI_signal_frame): Define. + (cfi_pseudo_table): Add .cfi_signal_frame. + (dot_cfi): Handle CFI_signal_frame. + (output_cie): Handle cie->signal_frame. + (select_cie_for_fde): Don't share CIE if signal_frame flag is + different. Copy signal_frame from FDE to newly created CIE. + * doc/as.texinfo: Document .cfi_signal_frame. + 2006-02-27 Carlos O'Donell * doc/Makefile.am: Add html target. diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index b6879e2..d34b754 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -4102,6 +4102,9 @@ using the known displacement of the CFA register from the CFA. This is often easier to use, because the number will match the code it's annotating. +@section @code{.cfi_signal_frame} +Mark current function as signal trampoline. + @section @code{.cfi_window_save} SPARC register window has been saved. diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index eb2f476..bfa5d5c 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -1,5 +1,5 @@ /* dw2gencfi.c - Support for generating Dwarf2 CFI information. - Copyright 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Michal Ludvig This file is part of GAS, the GNU Assembler. @@ -88,6 +88,7 @@ struct fde_entry struct cfi_insn_data *data; struct cfi_insn_data **last; unsigned int return_column; + unsigned int signal_frame; }; struct cie_entry @@ -95,6 +96,7 @@ struct cie_entry struct cie_entry *next; symbolS *start_address; unsigned int return_column; + unsigned int signal_frame; struct cfi_insn_data *first, *last; }; @@ -354,6 +356,7 @@ static void dot_cfi_endproc (int); #define CFI_return_column 0x101 #define CFI_rel_offset 0x102 #define CFI_escape 0x103 +#define CFI_signal_frame 0x104 const pseudo_typeS cfi_pseudo_table[] = { @@ -374,6 +377,7 @@ const pseudo_typeS cfi_pseudo_table[] = { "cfi_restore_state", dot_cfi, DW_CFA_restore_state }, { "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save }, { "cfi_escape", dot_cfi_escape, 0 }, + { "cfi_signal_frame", dot_cfi, CFI_signal_frame }, { NULL, NULL, 0 } }; @@ -547,6 +551,10 @@ dot_cfi (int arg) cfi_add_CFA_insn (DW_CFA_GNU_window_save); break; + case CFI_signal_frame: + cur_fde_data->signal_frame = 1; + break; + default: abort (); } @@ -864,6 +872,8 @@ output_cie (struct cie_entry *cie) out_one (DW_CIE_VERSION); /* Version. */ out_one ('z'); /* Augmentation. */ out_one ('R'); + if (cie->signal_frame) + out_one ('S'); out_one (0); out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH); /* Code alignment. */ out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment. */ @@ -944,7 +954,8 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst) for (cie = cie_root; cie; cie = cie->next) { - if (cie->return_column != fde->return_column) + if (cie->return_column != fde->return_column + || cie->signal_frame != fde->signal_frame) continue; for (i = cie->first, j = fde->data; i != cie->last && j != NULL; @@ -1017,6 +1028,7 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst) cie->next = cie_root; cie_root = cie; cie->return_column = fde->return_column; + cie->signal_frame = fde->signal_frame; cie->first = fde->data; for (i = cie->first; i ; i = i->next)