Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "incremental linking"?

I've looked at Microsoft's MSDN and all around the web, but I still haven't been able to get a really good idea of what it is.

Does it mean the completed program loads DLLs at different times during its execution, as apposed to all at once upon launch?

Am I totally way off? :)

like image 809
Russel Avatar asked Jul 28 '10 02:07

Russel


People also ask

What is partial linking?

Partial linking allows you to partition large applications, link each part separately, and then link all the parts together to create the final executable program. Follow these guidelines for producing a file that you will relink: The intermediate files produced by the linker must have relocation information.


1 Answers

Linking involves packaging together all of the .obj files built from your source files, as well as any .lib files you reference, into your output (eg .exe or .dll).

Without incremental linking, this has to be done from scratch each time.

Incremental linking links your exe/dll in a way which makes it easier for the linker to update the existing exe/dll when you make a small change and re-compile.

So, incremental linking just makes it faster to compile and link your project.

The only runtime effect it might have is that it may make your exe/dll slightly bigger and slower, as decribed here:

http://msdn.microsoft.com/en-us/library/4khtbfyf.aspx

Edit: As mentioned by Logan, incremental linking is also incompatible with link time code generation - therefore losing a possible performance optimization.

You may want to use incremental linking for debug builds to speed development, but disable it for release builds to improve runtime performance.

Delay loaded DLLs may be what you are thinking of:

http://msdn.microsoft.com/en-us/library/151kt790.aspx

like image 125
Saxon Druce Avatar answered Sep 21 '22 00:09

Saxon Druce