[PATCH 1/2] kernel32/tests: Align SizeOfHeaders to FileAlignment

Brendan McGrath brendan at redmandi.com
Thu Nov 29 04:26:51 CST 2018


Apologies - I didn't realise this test passed on Windows.

I do have a patch that will fix this in the wine implementation; but I 
felt it was a bit unwieldy for such a niche scenario (where the PE32 
header couldn't be remapped on to a PE32+ header). But I'm happy to 
submit it if that's the preferred approach.

On 29/11/18 8:33 pm, Alexandre Julliard wrote:
> Brendan McGrath <brendan at redmandi.com> writes:
>
>> According to:
>> https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#optional-header-windows-specific-fields-image-only
>>
>> SizeOfHeaders: The combined size of an MS-DOS stub, PE header, and section headers rounded up to a multiple of FileAlignment.
>>
>> This change also fixes two kernel loader tests currently failing under 64bit.
>>
>> Signed-off-by: Brendan McGrath <brendan at redmandi.com>
>> ---
>> This patch set fixes three of the four failing 64bit kernel32 loader tests.
>>
>> The remaining test that fails is due to the clr header being version 2.4 and wine only offering
>> 64bit support for clr header version 2.5 and above. I couldn't find any documentation
>> to state why that is so I've left the test as failing.
> These tests succeed on Windows. You should be fixing the Wine
> implementation to pass the tests, not the other way around.
>



More information about the wine-devel mailing list