ntdll: Revert 33b0f0edffa0c8a06b4ee8831c92fdc373f83ece.

André Hentschel nerv at dawncrow.de
Fri Nov 18 12:38:27 CST 2011


Am 17.11.2011 18:49, schrieb Saulius Krasuckas:
> On Thu, 17 Nov 2011, Alexandre Julliard wrote:
>>
>> The test requires a PE binary because obviously we can't test PE 
>> protections on Unix binaries. That doesn't mean it doesn't exist. Just 
>> build a crosstest:
>>
>> $ wine ntdll_crosstest.exe info.c
>> info.c:1296: Test failed: mbi.Protect is 0x8, expected 0x4
> 
> IIRC, some of tests already craft minimal PE binaries in manual way.
> So it would be nice to have some tool inside the tree to generate PEs 
> independetly, no?
> 
> Several years ago I've tried testing GetStdHandle() from within two PE 
> binaries with different header flags set (IMAGE_SUBSYSTEM_WINDOWS_[GC]UI).  
> 
> For a start I have copied some code of manual PE crafting to build PE 
> header.  Then there came .text section's order.  I realized it's 
> sufficient to write small assembler file, run it through the gas 
> crosscompiler, disasm it and parse the results to have _not only_ binary 
> data for rebuilding PE, but also symbolic one.
> 
> I wrote some awk-script then to convert .S file into C-function this way.  
> With it it was easy to adjust options for crosscompiling gas/ld tools to 
> get PE with needed structure.
> 
> But maybe there is point in creating some universal in-tree tool?  Or 
> integrate the functionality into winegcc (or else) so as not to depend on 
> a crosscompiling suite but still have readable and easy changeable source.
> 
> Guys, what do you think?

I would love to see such a tool, i could use it for some actctx tests in ntdll (Bug 18889)


-- 

Best Regards, André Hentschel



More information about the wine-devel mailing list