> On Windows it is not possible to require that a DLL be loaded at a
> specific address in memory within a process. The base address is simply
> a recommendation and if correct will result in the library loading
> process being faster than if it is not.
Correct and prerequisite for recommended base address is respected is
its, address's, availability. Reasoning was that if it's not the case
one would have to ensure it in some way, most notably by linking OpenSSL
> Any fingerprinting of a
> library needs to be performed by computing the memory offsets compared
> to the base address and using those.
The trouble is that code emitted by Windows compilers is not
position-independent, meaning that relocations, offsets fix-ups, reside
[among other things] in .text segment. My understanding is that it's x86
compilers that are "at-fault", x64 code should be position-independent...
> Microsoft Vista, Server 2008, Win7 and Server 2008-R2 all support enable
> by default Address space layout randomization (ASLR). Visual Studio
> 2010 is the first version of Windows development tools to turn ASLR on
> by default for EXEs and DLLs. To disable, use /DYNAMICBASE:NO when
> linking. (Or disable the "Randomized Base Address property in Visual