ntdll: Do not perform base relocation if an image is not a DLL. Take 2

Paul Chitescu paulc at voip.null.ro
Thu Jan 17 12:35:51 CST 2008


IMHO it doesn't worth to the to relocate EXEs since virtually none are 
providing relocation records. Any operating system that can't allocate 
memory at low virtual addresses won't be able to run any Windows 
application newer than about 13 years (that is, all of interess).

EXEs were relocated only in Win32s where all applications were sharing a 
single address space. Since Visual C 4 the linker default is to not 
generate relocations for EXE files.

Paul Chitescu

On Thu, 17 Jan 2008, Dmitry Timoshkov wrote:
> Hello,
> this patch fixes the problem reported in the bug 11170. It appears that
> LoadLibrary in Windows doesn't attempt to relocate .exe files.
> Alexandre noticed that previous version of the patch may break relocation of
> the main exe. This version addresses that. However, this appears to be not
> compatible with what Windows (does not) do: in order to force a relocation
> of main under XP I set its base address to match the ntdll.dll (0x7c900000),
> and XP just refused to load the exe with an error message "The system cannot
> execute the specified program." But we may need to relocate main exe due to
> environment limitations (some native .so file may be mapped at that address).
> Changelog:
> [...]

More information about the wine-devel mailing list