According to this article rebasing is not necessary for .NET assemblies due to JIT compilation of the code. The article states:
"JIT-compiled code does not have a rebasing problem since the addresses are generated at run time based on where the code is placed in memory. Also, MSIL is rarely affected by base address misses since MSIL references are token-based, rather than address-based. Thus when the JIT compiler is used, the system is resilient to base address collisions."
However, I have noticed that VS2008 assigns the default 0x0400000 base address to all assemblies (project properties > build > advanced) and if I do a listdlls /r
for my process all my .NET assemblies are in fact rebased per default.
If I assign addresses myself, no rebasing is done.
My question is: What is rebased in this case and why?
EDIT: I should add that I am not talking about NGen'ed assemblies.