PE mapping
Eric Pouech
pouech-eric at wanadoo.fr
Wed Jun 18 15:10:10 CDT 2003
some program I recently tested (DVD Shrink 2.0 not to name it) has a PE
section with both attributes IMAGE_SCN_CNT_UNINITIALIZED_DATA and
IMAGE_SCN_CNT_INITIALIZED_DATA set.
I assume we should map the section in this case (what we weren't doing).
The program doesn't load yet (it will be fixed by some other patch)
A+
--
Eric Pouech
-------------- next part --------------
Name: pe
ChangeLog: fixed section mapping in PE loading when both IMAGE_SCN_CNT_UNINITIALIZED_DATA and IMAGE_SCN_CNT_INITIALIZED_DATA are set
License: X11
GenDate: 2003/06/18 20:07:42 UTC
ModifiedFiles: dlls/ntdll/virtual.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/virtual.c,v
retrieving revision 1.6
diff -u -u -r1.6 virtual.c
--- dlls/ntdll/virtual.c 8 May 2003 03:50:32 -0000 1.6
+++ dlls/ntdll/virtual.c 9 Jun 2003 08:14:52 -0000
@@ -658,7 +658,8 @@
sec->PointerToRawData, sec->SizeOfRawData,
sec->Characteristics );
- if (sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) continue;
+ if ((sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) &&
+ !(sec->Characteristics & IMAGE_SCN_CNT_INITIALIZED_DATA)) continue;
if (!sec->PointerToRawData || !sec->SizeOfRawData) continue;
/* Note: if the section is not aligned properly VIRTUAL_mmap will magically
More information about the wine-patches
mailing list