From: Hartmut Birr
Log message:
- Rewrote (copied from ntdll) parts of the relocation
and import fixup code.
- Don't load no-load sections at the end of the driver.
- Don't relocate the relocation section itself.
- Set the correct page protection for section which are
executable.
With current CVS, the VMware SVGA driver crashes. It happens in a
HwFindAdapter() call. While tracing through the driver, I got this eery
"I've been here before" feeling. And sure enough, I fixed this same crash
about a year and a half ago.
The problem is that vmx_svga.sys has a section alignment of 0x20 instead of
the normal 0x1000. So, sections are much smaller than the page size. When
setting the page protections you need to take into account all the sections
which might be mapped to that page. This was implemented in
ntoskrnl/ldr/loader.c rev 1.126.
Gé van Geldorp.