[C++-sig] Re: RTTI and image size
David Abrahams
dave at boost-consulting.com
Mon Oct 20 11:47:34 CEST 2003
"Niall Douglas" <s_sourceforge at nedprod.com> writes:
> On 19 Oct 2003 at 17:01, David Abrahams wrote:
>
>> > Sounds to me like GCCXML is again the answer - where it sees calls
>> > to some luabind function with some type, it outputs the type into a
>> > file from where luabind can assign it a unique id.
>>
>> I assume you mean Boost.Python, not luabind.
>
> I meant luabind which from my cursory reading of the docs spoke about
> assigning unique integers to types.
Won't help you much if you're interested in Python, though.
>> Anyway, you're essentially assuming that someone can figure out how to
>> generate smaller RTTI information than MSVC does already. "Don't
>> assume you can do the job better than the compiler already does" is a
>> cardinal rule for embedded programmers using C++; I don't see why it
>> shouldn't apply here just as well.
>
> It has, because of the standard, to generate RTTI for anything which
> could be queried, including by something loading it in as a DLL.
The standard doesn't cover DLLs at all, so all bets are off in that
case... but that's a technicality.
> Now I know that can't happen and that all use of RTTI it does is
> limited to what it does, so therefore there is great scope for
> cutting stuff out.
Yeah, you don't really need to compile most of your extension module
for export as a DLL; extension modules are loaded by name and only a
single entry point is used. There really should be a way to get the
linker to strip the RTTI you don't need, or at least much of it.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list