Lib change leads to larger executables

Sean Kelly sean at f4.ca
Fri Feb 23 14:23:38 PST 2007


Walter Bright wrote:
> Sean Kelly wrote:
>> Sean Kelly wrote:
>>> Walter Bright wrote:
>>>> John Reimer wrote:
>>>>> optlink may just be the bane for D acceptance. And Tango gets the 
>>>>> pitiful
>>>>> opportunity of demonstrating why D is NOT ready for prime-time in the
>>>>> commercial realm: the DM support tools it relies on are bogged down in
>>>>> the past, reflecting D's lopsided existance on yet another level: a 
>>>>> strong
>>>>> language relying on a fragile, outdated, and poorly fit tool set.
>>>>
>>>> Linux's ld exhibits the same behavior. Try compiling the 3 files 
>>>> here according to the instructions below, and try different 
>>>> orderings adding the object files to the librarian (ar). The same 
>>>> behavior as lib/optlink results (using nm to see what symbols are 
>>>> placed into the resulting executable).
>>>
>>> In your example, no symbols at all from a is referenced in b or in 
>>> test, and yet it's linked anyway in the first case?
>>
>> Forget I said that.  It's the TypeInfo for char[][].
> 
> That's right, it picked the FIRST ONE in library, regardless of how many 
> other .o's defined it, and regardless of what else was in that .o, 
> referenced or not.

That makes complete sense.  It's irritating that such matches pull in 
the entire object, but at least the process is straightforward and logical.



More information about the Digitalmars-d mailing list