Separating type_info classes into separate .o files

Mark Mitchell mark@codesourcery.com
Fri Mar 16 19:58:00 GMT 2007


The tinfo2.cc file in libsupc++ contains implementations of all the C++
ABI type_info routines.  For example, that file contains
__pbase_type_info::__do_catch, and
__function_type_info::~__function_type_info.  The virtual tables (and
type_info objects!) for all of the type_info classes are also defined in
tinfo2.cc; that's the reason for the destructor definitions.

Many programs need some of these classes, but not others.  In
particular, things like __array_type_info and __function_type_info are
rarely needed.  On embedded systems, this is a bit of library bloat, and
we can easily eliminate it, by separating tinfo2.cc into a separate file
per type_info class.

Do the libstdc++ maintainers have any objections to this change, in
principle?

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list