Daniel Jacobowitz wrote: > 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?
Certainly, there are at least some such cases. I guess a function whose only callees (if any) are no-throw functions, and which itself does not use "throw", does not need frame information. But, for something like: extern void f(); void g() { f(); f(); } we do need unwind information, even though "g" has nothing to do with exceptions. However, I think you and Michael are right: we don't need to reference the personality routine here. Unless the entire program doesn't contain anything that needs cleaning up, we'll still need it in the final executable, but omitting it would make our object files smaller, and unwinding a little faster, since we don't call personality routines that aren't there. -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713