On Sun, Dec 02, 2007 at 02:41:17AM +0000, Pedro Alves wrote: > Kevin O'Connor wrote: > > Unfortunately, try as I might, I could not get haret (see > > http://www.handhelds.org/moin/moin.cgi/HaRET) to shrink with > > -fno-exceptions. As a guess, it looks like anything that requires > > libsupc++.a is going to pull in the exception code. Many basic c++ > > constructs (eg, vtables, new, delete) pull in that library. > > I've once did reduce the amount of bloat c++ exception > handling for an embedded (<32k) firmware app. > > First, reimplement operator new*, on top of malloc, not > touching anything related to exceptions:
Hi Pedro, When I went through this exercise, I just started commenting out stuff to see what was forcing the exceptions into the exe. I got down to the following stuff still needed from libsupc++.a: undefined reference to `vtable for __cxxabiv1::__si_class_type_info' undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' undefined reference to `vtable for __cxxabiv1::__class_type_info' undefined reference to `__cxa_pure_virtual' So, it looks like any class with a vtable is going to pull in libsubc++ which then pulls in the exception code. The effort to pull out vtables is basically on par with just porting to C. I guess I can take a look and see if I can build stubs for the class_type_info stuff. > I can't remember which functions they were OTTOMH, but I > used this to get a clear look at what's pulling what: > > http://sources.redhat.com/ml/newlib/2006/msg00309.html > BTW, I tried this, but I couldn't figure out what I was supposed to send into this script. The output from 'ld -M' doesn't seem to do anything. -Kevin ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel