mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
ntdll: Revert 33b0f0edff
.
The tests clearly show that this commit is wrong.
This commit is contained in:
parent
277259157b
commit
517d0800df
2 changed files with 1 additions and 17 deletions
|
@ -691,11 +691,6 @@ static void test_section_access(void)
|
||||||
"%d: VirtualQuery error %d\n", i, GetLastError());
|
"%d: VirtualQuery error %d\n", i, GetLastError());
|
||||||
ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress);
|
ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress);
|
||||||
ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize);
|
ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize);
|
||||||
/* FIXME: remove the condition below once Wine is fixed */
|
|
||||||
if ((td[i].scn_file_access & IMAGE_SCN_MEM_WRITE) &&
|
|
||||||
(td[i].scn_file_access & IMAGE_SCN_CNT_UNINITIALIZED_DATA))
|
|
||||||
todo_wine ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
|
||||||
else
|
|
||||||
ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
||||||
ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib);
|
ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib);
|
||||||
ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect);
|
ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect);
|
||||||
|
@ -735,11 +730,6 @@ static void test_section_access(void)
|
||||||
"%d: VirtualQuery error %d\n", i, GetLastError());
|
"%d: VirtualQuery error %d\n", i, GetLastError());
|
||||||
ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress);
|
ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress);
|
||||||
ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize);
|
ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize);
|
||||||
/* FIXME: remove the condition below once Wine is fixed */
|
|
||||||
if ((td[i].scn_file_access & IMAGE_SCN_MEM_WRITE) &&
|
|
||||||
(td[i].scn_file_access & IMAGE_SCN_CNT_UNINITIALIZED_DATA))
|
|
||||||
todo_wine ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
|
||||||
else
|
|
||||||
ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access);
|
||||||
ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib);
|
ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib);
|
||||||
ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect);
|
ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect);
|
||||||
|
|
|
@ -1345,14 +1345,8 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
|
||||||
size = ROUND_SIZE( sec->VirtualAddress, sec->SizeOfRawData );
|
size = ROUND_SIZE( sec->VirtualAddress, sec->SizeOfRawData );
|
||||||
|
|
||||||
if (sec->Characteristics & IMAGE_SCN_MEM_READ) vprot |= VPROT_READ;
|
if (sec->Characteristics & IMAGE_SCN_MEM_READ) vprot |= VPROT_READ;
|
||||||
|
if (sec->Characteristics & IMAGE_SCN_MEM_WRITE) vprot |= VPROT_WRITECOPY;
|
||||||
if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC;
|
if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC;
|
||||||
if (sec->Characteristics & IMAGE_SCN_MEM_WRITE)
|
|
||||||
{
|
|
||||||
if (sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
|
|
||||||
vprot |= VPROT_WRITE;
|
|
||||||
else
|
|
||||||
vprot |= VPROT_WRITECOPY;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dumb game crack lets the AOEP point into a data section. Adjust. */
|
/* Dumb game crack lets the AOEP point into a data section. Adjust. */
|
||||||
if ((nt->OptionalHeader.AddressOfEntryPoint >= sec->VirtualAddress) &&
|
if ((nt->OptionalHeader.AddressOfEntryPoint >= sec->VirtualAddress) &&
|
||||||
|
|
Loading…
Reference in a new issue