This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR41260 link with -no_compact_unwind on darwin10 and later


On Mon, Sep 21, 2009 at 09:12:57AM -0500, Peter O'Gorman wrote:
> Jack Howarth wrote:
> >    The exception handling tests failing on darwin10 since r147995
> > are due to the new dwarf unwinding information being added
> > to describe the function epilog. This breaks the unwinding
> > under darwin10 since the unwinder used is always from libSystem
> > (based on that from libgcc in gcc 4.2.1) that doesn't expect
> > this additional information. The attached patch takes the second
> > option of passing -no_compact_unwind onto the linkage for darwin10
> > or later. This eliminates all of the regressions from r147995...
> > 
> > http://gcc.gnu.org/ml/gcc-testresults/2009-09/msg01761.html
> > 
> > and more. While we might be able to use the alternate approach
> > of suppressing the additional dwarf unwinding information, I fear
> > that there are other incompatibilities left in the compact 
> > unwinding when it is generated by FSF gcc 4.5 but run with an
> > unwinder based on gcc 4.2.1. Hence the additional regressions
> > disappearing when -no_compact_unwind is used.
> >     There still is the question of whether this change should
> > be extended to all darwin and not just darwin10 or later? The
> > current patch fixes darwin10 but binaries built with gcc 4.5
> > on darwin9 and run under darwin10 will still have the offending
> > dwarf unwinding information present.
> >        Okay for gcc trunk?
> 
> Jack,
> 
> I realize that this patch is a one-liner, and that you put the effort
> into testing it, but it would have been polite to have put one of "Peter
> O'Gorman", "pogma", or "http://gcc.gnu.org/ml/gcc/2009-09/msg00343.html";
> somewhere in this patch submission.
> 
> As for darwin9 and earlier, the static linker pre-10.6 did not do
> anything with dwarf unwind information, so there is nothing to do, no
> compact unwind info will be created, so the unwinder will "fallback and
> use the slow dwarf unwind info" (to quote Nick Kledzik).
> 
> If this patch is approved, it should probably be reverted if the epilog
> unwind info is no longer output for darwin.
> 
> Peter
> 
> Note:
> The -no_compact_unwind linker option is not documented, the ld man page
> does document -warn_compact_unwind, which gives some information on the
> compact unwinding section added by the linker:
> 
>       When producing a final linked image, the linker processes the
>       __eh_frame section and produces an __unwind_info section.
>       Most FDE entries in the __eh_frame can be represented by a
>       32-bit value in the __unwind_info section.  The option issues
>       a warning for any function whose FDE cannot be expressed in
>       the compact unwind format.
> 
> 
> 

Peter,
   No, problem. I already had considered adding that change myself
locally but you can have ownership of the patch. I repost it with
your name in the changlog.
            Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]