user1232138
user1232138

Reputation: 5541

Why won't the loader load at the desired location

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??

Upvotes: 0

Views: 270

Answers (1)

mox
mox

Reputation: 6314

Basically, this takes place in the following situations:

  1. The address at which the image prefers to be loaded is already occupied. For example, there may be another image already loaded there.
  2. The image to be loaded has been compiled with ASLR enabled.
  3. The FLG_LDR_TOP_DOWN global flag has been set, which forces modules to be loaded at the highest possible address.

Upvotes: 2

Related Questions