Lib change leads to larger executables

Kristian Kilpi kjkilpi at gmail.com
Thu Feb 22 11:52:59 PST 2007


On Thu, 22 Feb 2007 18:32:18 +0200, Frits van Bommel  
<fvbommel at REMwOVExCAPSs.nl> wrote:

> Sean Kelly wrote:
>> Ideally, perhaps a linker could provide both options: link fast and  
>> potentially bloat the exe or link carefully (and slowly) for a lean  
>> exe.  I'd use the fast link for debugging and the slow link for  
>> releases. Assuming, of course, that the linker were reliable enough  
>> that there was no risk of changing app behavior between the two.
>
> That might not be the case here: if a module's object file is pulled in,  
> that module's static constructors and destructors are called at runtime,  
> right? So if different modules are pulled in with those options,  
> different static constructors/destructors get called.
> (Same goes for unit tests, if enabled, by the way)

Hmm, yes, but how that's different from the today's situation? Currently  
the linker chooses *arbitrary* object modules that happen to contain the  
needed typeinfo.



More information about the Digitalmars-d mailing list