Lib change leads to larger executables

Pragma ericanderton at yahoo.removeme.com
Wed Feb 21 11:43:38 PST 2007


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[]]".

Just a hunch: does the .lib's dictionary play a role in OPTLINK's use of finding COMDAT symbol matches in a .lib file? 
Maybe there's some non-.obj-order-dependent behavior going on between the two.

-- 
- EricAnderton at yahoo



More information about the Digitalmars-d mailing list