Geoff Brimhall wrote:
Wrote a test mmap binary to fill a process address
space, it created a similar gap between the executable
load address and the loaded shared libraries,
eventually failing mmap calls when it hit the stack
address space. When I updated the test app to
explicitly mmap in the gap area via specifying the
aligned start address, the mmap call succeeded.
I can't be the first person to notice this. Are there
any TODO solutions for this ?
Wine's holey memory map has been discussed before:
http://www.winehq.com/pipermail/wine-devel/2006-February/044979.html
The "truely correct" solution is probably to implement Windows
compatible memory allocation in the Linux kernel, but there's other
hacks that could be done in user space. Just a matter of finding
something that Alexandre is willing to live with.
A preload-ish type thing that overrode libc's mmap/munmap calls seems
pausible to me.
Mike