This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: Reducing the size of C++ executables - eliminating malloc


On Sun, Nov 12, 2006 at 05:11:39PM -0800, Mark Mitchell wrote:
> 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.

You've talked right past me, since I wasn't saying that...

> However, I think you and Michael are right: we don't need to reference
> the personality routine here.

... but this.

> Unless the entire program doesn't
> contain anything that needs cleaning up, we'll still need it in the
> final executable,

Right.  So if you use local variables with destructors, even though you
don't use exceptions, you'll get the personality routine.  The linker
could straighten that out if we taught it to, though.

-- 
Daniel Jacobowitz
CodeSourcery


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