multiple destructors

Andy Green andy.green@oxsemi.com
Tue Aug 30 15:01:00 GMT 2005


I'm using arm-elf-gcc version 3.4.3. Browsing the output binary, I see 
three destructors for every class, and I can't help thinking that the 
output is bigger than it needs to be.

This was me...
http://lists.gnu.org/archive/html/bug-gnu-utils/2004-07/msg00042.html

... so I know why they're there - to provide in-charge and not-in-charge 
destruction, and to cater for virtual base classes. However, I know my 
code and therefore know that some of them aren't needed (e.g. I have no 
virtual base classes). Is there any way to get the linker to strip out 
the ones that aren't referenced? I don't mind using a non-compliant ABI.

TIA,
Andy




More information about the Gcc-help mailing list