3 ms·
wow, how come the mere presence of a function causes a DLL to get loaded? Is it because in order to compile, the DLL (or its export definition) needs to be pres
by chii 8y ago
wow, how come the mere presence of a function causes a DLL to get loaded? Is it because in order to compile, the DLL (or its export definition) needs to be present, and the compiler does some magic because of that?
- _wmd 8y agoLazy binding isn't without downsides, it requires internal synchronization of its own, which means it's possible to write multithreaded programs that will suffer latencies due to lock contention during symbol resolution. Depending on OS (not sure this applies to Windows), it can also mean what used to be fatal startup errors are delayed long into process life
- TickleSteve 8y agoBecause it was linked in, extra GDI dlls were also linked in leading to GDI cleanup. The linker has no idea that the function is unreachable, it has to link it in to resolve the external symbols.