It is said that sometimes the loader loads the exe at an address which is different than the one assumed by the linker. What all could be the cases when loader does so??
mox
Basically, this takes place in the following situations:
- The address at which the image prefers to be loaded is already occupied. For example, there may be another image already loaded there.
- The image to be loaded has been compiled with ASLR enabled.
- The
FLG_LDR_TOP_DOWN
global flag has been set, which forces modules to be loaded at the highest possible address.
来源:https://stackoverflow.com/questions/9698496/why-wont-the-loader-load-at-the-desired-location