winebuild-Fake_Dlls: Fix the fake DLL function dispatcher offset.

Fixes: ff10ae6e74

Spotted by Ken Thomases.
This commit is contained in:
Zebediah Figura 2020-02-06 11:37:07 -06:00
parent 991bebfee7
commit 14a3242b92

View File

@ -1,4 +1,4 @@
From 97479646b6ae8f865b4184c6dff988c06f0c32f5 Mon Sep 17 00:00:00 2001
From c6c3f424a6ee8983f37d3ce212dfd5519a195055 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 15 May 2017 16:27:56 +0200
Subject: [PATCH] winebuild: Add stub functions in fake dlls.
@ -13,7 +13,7 @@ Subject: [PATCH] winebuild: Add stub functions in fake dlls.
6 files changed, 255 insertions(+), 15 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 4d9a26075f2..29cf15585f9 100644
index 4d9a26075..29cf15585 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1559,9 +1559,7 @@ static void test_FakeDLL(void)
@ -61,7 +61,7 @@ index 4d9a26075f2..29cf15585f9 100644
CloseHandle(map);
CloseHandle(file);
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index a0f8b3a2ec6..e551646301f 100644
index a0f8b3a2e..e55164630 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -445,6 +445,45 @@ static wine_signal_handler handlers[256];
@ -119,10 +119,10 @@ index a0f8b3a2ec6..e551646301f 100644
if (!(thread_data->fs = wine_ldt_alloc_fs()))
{
diff --git a/include/winternl.h b/include/winternl.h
index 843c874031b..464703e3925 100644
index 713e71802..754bdae14 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -396,7 +396,7 @@ typedef struct _TEB
@@ -398,7 +398,7 @@ typedef struct _TEB
PVOID Instrumentation[16]; /* f2c/16b8 */
PVOID WinSockData; /* f6c/1738 */
ULONG GdiBatchCount; /* f70/1740 */
@ -132,7 +132,7 @@ index 843c874031b..464703e3925 100644
PVOID ReservedForPerf; /* f7c/1750 */
PVOID ReservedForOle; /* f80/1758 */
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 53d4ba192eb..09a654de165 100644
index 53d4ba192..09a654de1 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -357,6 +357,7 @@ extern void put_word( unsigned short val );
@ -144,7 +144,7 @@ index 53d4ba192eb..09a654de165 100644
extern void align_output_rva( unsigned int file_align, unsigned int rva_align );
extern size_t label_pos( const char *name );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index e67cb48cd08..89ad63cd738 100644
index e67cb48cd..692db4c7e 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -884,6 +884,163 @@ void output_spec32_file( DLLSPEC *spec )
@ -238,8 +238,8 @@ index e67cb48cd08..89ad63cd738 100644
+ put_byte( 0x8d ); put_byte( 0x81 ); /* lea eax, [dll_name] */
+ put_dword( label_rva("dll_name") - thunk );
+ put_byte( 0x50 ); /* push eax */
+ put_byte( 0x64 ); put_byte( 0xff ); /* call dword ptr fs:[0F78h] */
+ put_byte( 0x15 ); put_dword( 0xf78 );
+ put_byte( 0x64 ); put_byte( 0xff ); /* call dword ptr fs:[0F74h] */
+ put_byte( 0x15 ); put_dword( 0xf74 );
+ put_byte( 0x5a ); /* pop edx */
+ put_byte( 0x89 ); put_byte( 0x02 ); /* mov dword[edx], eax */
+ rva = output_buffer_rva + 2;
@ -400,7 +400,7 @@ index e67cb48cd08..89ad63cd738 100644
/* .reloc contents */
align_output_rva( file_align, section_align );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index f53e09227ca..0f4642d43ae 100644
index f53e09227..0f4642d43 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -548,7 +548,7 @@ size_t output_buffer_size;
@ -442,5 +442,5 @@ index f53e09227ca..0f4642d43ae 100644
{
size_t size = align - (output_buffer_pos % align);
--
2.17.1
2.25.0