[ros-diffs] [ion] 15518: make PE loader more lenient with
alignment. it could previously not load PEs that I can load
on Windows
ion at svn.reactos.com
ion at svn.reactos.com
Thu May 26 15:52:32 CEST 2005
make PE loader more lenient with alignment. it could previously not load
PEs that I can load on Windows
Modified: trunk/reactos/ntoskrnl/mm/pe.c
_____
Modified: trunk/reactos/ntoskrnl/mm/pe.c
--- trunk/reactos/ntoskrnl/mm/pe.c 2005-05-26 13:50:52 UTC (rev
15517)
+++ trunk/reactos/ntoskrnl/mm/pe.c 2005-05-26 13:52:30 UTC (rev
15518)
@@ -518,8 +518,8 @@
/* size of the executable's headers */
if(RTL_CONTAINS_FIELD(piohOptHeader, cbOptHeaderSize, SizeOfHeaders))
{
- if(!IsAligned(piohOptHeader->SizeOfHeaders, nFileAlignment))
- DIE(("SizeOfHeaders is not aligned\n"));
+ //if(!IsAligned(piohOptHeader->SizeOfHeaders, nFileAlignment))
+ //DIE(("SizeOfHeaders is not aligned\n"));
if(cbSectionHeadersSize > piohOptHeader->SizeOfHeaders)
DIE(("The section headers overflow SizeOfHeaders\n"));
@@ -611,7 +611,7 @@
/* initialize the headers segment */
pssSegments = ImageSectionObject->Segments;
- ASSERT(IsAligned(cbHeadersSize, nFileAlignment));
+ //ASSERT(IsAligned(cbHeadersSize, nFileAlignment));
if(!AlignUp(&nFileSizeOfHeaders, cbHeadersSize, nFileAlignment))
DIE(("Cannot align the size of the section headers\n"));
@@ -655,8 +655,8 @@
DIE(("SizeOfRawData[%u] is not aligned\n", i));
#endif
- if(!IsAligned(pishSectionHeaders[i].PointerToRawData,
nFileAlignment))
- DIE(("PointerToRawData[%u] is not aligned\n", i));
+ //if(!IsAligned(pishSectionHeaders[i].PointerToRawData,
nFileAlignment))
+ //DIE(("PointerToRawData[%u] is not aligned\n", i));
/* conversion */
pssSegments[i].FileOffset = pishSectionHeaders[i].PointerToRawData;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050526/56e4a756/attachment.html
More information about the Ros-diffs
mailing list