On Monday 13 November 2006 00:53, Daniel Jacobowitz wrote: > On Sun, Nov 12, 2006 at 11:17:14PM +0000, Paul Brook wrote: > > The code being unwound through (ie. with frame data) needs to be able to > > say "I need routine X if __Unwind_Raise is used anywhere in this > > program". I'm not aware of any way of doing this, other than trying it > > and starting again if you guessed wrong. > > Again, IIRC ARM's linker does something clever here. Of course the ABI > in use there is somewhat different, but I suspect it could be adapted.
Probably. I don't think the ABI differences are relevant here. > On Sun, Nov 12, 2006 at 03:20:48PM -0800, Mark Mitchell wrote: > > But, the way the ABI works requires a reference from each unit which may > > cause unwinding. Even if you lose the personality routine, you will > > still have the exception tables, which themselves are a significant > > cost. If you don't want to pay for exceptions, you really have to > > compile with -fno-exceptions. In that case, certainly, we should be > > able to avoid pulling in the personality routine. > > If you try what Michael's been saying, you'll notice that trivial > C++ files get the personality routine reference even if they don't > have anything with a destructor which would need cleaning up. We ought > to be able to emit (somewhat smaller) unwind information which doesn't > reference the personality routine if it's going to have nothing to do, > shouldn't we? Ah, ok, sorry. ARM unwinding works a bit differently, and you always need a personality routine. Paul