[PATCH] ntdll: round section parameters on 0x200

Andrey Turkin pancha at mail.nnov.ru
Sat Nov 11 15:20:39 CST 2006

This patch does 2 things:
1) round PointerToRawData down on 0x200 boundary;
2) round section initialized data end up on 0x200 boundary.
Such loader behaviour is not documented, but Win2k3, IDA and hiew all 
follow the same rules (some forum topics stated the same, too).

Also, this patch implements similar roundings for file header. It also 
disables mmaping of header in order to not read data beyond 0x200 
boundary (an alternative to it would be to clear header memory beyond 

The patch fixes bug #3702 (UPack packed files, file header mapped 3 
  dlls/ntdll/virtual.c |   28 ++++++++++++++++------------
  1 files changed, 16 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9ad360848213a03c4e7c6223ae2c554db8d3a701.diff
Type: text/x-patch
Size: 4606 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061112/6aaff9c7/9ad360848213a03c4e7c6223ae2c554db8d3a701.bin

More information about the wine-patches mailing list