* dw2gencfi.c (all_fde_data): Export. * dw2gencfi.h (all_fde_data): Declare. * config/tc-alpha.c (alpha_elf_md_end): Don't convert legacy unwind info to cfi unwind info if the user already has supplied some. Index: dw2gencfi.c =================================================================== RCS file: /cvs/src/src/gas/dw2gencfi.c,v retrieving revision 1.56 diff -u -p -r1.56 dw2gencfi.c --- dw2gencfi.c 10 May 2011 02:36:41 -0000 1.56 +++ dw2gencfi.c 5 Aug 2011 18:05:10 -0000 @@ -287,7 +287,7 @@ struct cie_entry /* List of FDE entries. */ -static struct fde_entry *all_fde_data; +struct fde_entry *all_fde_data; static struct fde_entry **last_fde_data = &all_fde_data; /* List of CIEs so that they could be reused. */ Index: dw2gencfi.h =================================================================== RCS file: /cvs/src/src/gas/dw2gencfi.h,v retrieving revision 1.9 diff -u -p -r1.9 dw2gencfi.h --- dw2gencfi.h 9 May 2011 13:17:56 -0000 1.9 +++ dw2gencfi.h 5 Aug 2011 18:05:10 -0000 @@ -118,6 +118,9 @@ struct fde_entry #endif }; +/* The list of all FDEs that have been collected. */ +extern struct fde_entry *all_fde_data; + /* Fake CFI type; outside the byte range of any real CFI insn. */ #define CFI_adjust_cfa_offset 0x100 #define CFI_return_column 0x101 Index: config/tc-alpha.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-alpha.c,v retrieving revision 1.95 diff -u -p -r1.95 tc-alpha.c --- config/tc-alpha.c 28 Jun 2011 13:33:33 -0000 1.95 +++ config/tc-alpha.c 5 Aug 2011 18:05:10 -0000 @@ -4042,6 +4042,14 @@ alpha_elf_md_end (void) if (bfd_get_section_by_name (stdoutput, ".eh_frame") != NULL) return; + /* ??? In theory we could look for functions for which we have + generated unwind info via CFI directives, and those we have not. + Those we have not could still get their unwind info from here. + For now, do nothing if we've seen any CFI directives. Note that + the above test will not trigger, as we've not emitted data yet. */ + if (all_fde_data != NULL) + return; + /* Generate .eh_frame data for the unwind directives specified. */ for (p = all_frame_data; p ; p = p->next) if (p->prologue_sym)