From 87cbe344d00e41b46df4c9e44419b8c14cd49620 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 25 May 2017 21:56:06 +0200
Subject: [PATCH] libs/wine: Use same file alignment for fake and builtin DLLs.

---
 dlls/kernel32/tests/loader.c | 1 -
 libs/wine/loader.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index ffc28fd..c9af524 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1455,7 +1455,6 @@ static void test_FakeDLL(void)
         /* check position in file */
         map_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(ptr),    ptr,    map_rva, NULL) - (DWORD_PTR)ptr;
         dll_offset = (DWORD_PTR)RtlImageRvaToVa(RtlImageNtHeader(module), module, dll_rva, NULL) - (DWORD_PTR)module;
-    todo_wine
         ok(map_offset == dll_offset, "%s: File offset of mapped function (0x%x) does not match dll (0x%x)\n",
            func_name, map_offset, dll_offset);
 
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 677e0fe..162c94d 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -468,7 +468,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
     sec->SizeOfRawData = code_end - code_start;
     sec->Misc.VirtualSize = sec->SizeOfRawData;
     sec->VirtualAddress   = code_start;
-    sec->PointerToRawData = code_start;
+    sec->PointerToRawData = 0x200; /* file alignment */
     sec->Characteristics  = (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ);
     sec++;
 
-- 
1.9.1

