Lib change leads to larger executables

kris foo at bar.com
Wed Feb 21 11:52:49 PST 2007


Pragma wrote:
> Frits van Bommel wrote:
> 
>> kris wrote:
>>
>>> Pragma wrote:
>>>
>>>> Sorry if I'm stating the obvious, but it seems to me that the linker 
>>>> is finding this typeinfo COMDAT in Core first, rather than somewhere 
>>>> else, and is thereby forcing the inclusion of the rest of it's 
>>>> containing module.
>>>>
>>>> Does moving core.obj to the end of the .lib solve the problem?
>>>>
>>>
>>> Heya Eric
>>>
>>> That's what it seems like and (as noted above) core.obj is already 
>>> the very last one added to the lib ;)
>>>
>>> The only way to resolve at this point is to remove core.obj entirely.
>>
>>
>> Did you try putting it at the front of the lib? You never know, maybe 
>> it picks the last one instead of the first one.
>>
>> Unless it just happens to be the only module to define 
>> _D12TypeInfo_AAa6__initZ ...
> 
> 
> I thought about that too, but that doesn't seem to be the case. As Kris 
> also stated, the lib compiles when Core is removed.  That implies that 
> the TypeInfo mentioned lives elsewhere - and it very likely does, as 
> it's a "char[char[]]".
> 

Perhaps a question is this: why the heck is that symbol exposed from 
Core, when it should instead be exposed via the TypeInfo class for 
char[][] instead ... linked via the TypeInfo classes in Object.d? A 
large number of those are present in every D executable.








More information about the Digitalmars-d mailing list