You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 5a61913e90e3725d08c0e1fd06ccfe936434cbcc.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 7328ffb1e48698e786ff4b1c8330d50ef24b9ac1 Mon Sep 17 00:00:00 2001
|
||||
From 4966ad10599a5e8fb68b13243471aba4f80f0fb5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 16 May 2017 04:37:52 +0200
|
||||
Subject: krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit stack
|
||||
@@ -470,10 +470,10 @@ index fa49a246ab8..bd69b844607 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index 59dca6cfca0..d0f25ed3ce4 100644
|
||||
index 2301ba4c3c8..8b8049b80da 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -990,7 +990,7 @@ static inline void *init_handler( const ucontext_t *sigcontext, WORD *fs, WORD *
|
||||
@@ -1019,7 +1019,7 @@ static inline void *init_handler( const ucontext_t *sigcontext, WORD *fs, WORD *
|
||||
* SS is still non-system segment. This is why both CS and SS
|
||||
* are checked.
|
||||
*/
|
||||
@@ -594,7 +594,7 @@ index 9e07be97779..c020998b7e2 100644
|
||||
|
||||
stack16->ds = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
|
||||
diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
|
||||
index aba797debc1..44e6f49e1a3 100644
|
||||
index 35f25859594..d473dcdebda 100644
|
||||
--- a/dlls/user.exe16/user.c
|
||||
+++ b/dlls/user.exe16/user.c
|
||||
@@ -1388,7 +1388,7 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16 count,
|
||||
@@ -629,7 +629,7 @@ index e81d9ace3ae..afe40b2df98 100644
|
||||
/* don't use WIN_Handle32 here, we don't care about the full handle */
|
||||
return IsWindow( HWND_32(hwnd) );
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 5cd1664f1fe..ae3163daeac 100644
|
||||
index b814b86d289..23bf3ac8fd7 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -325,7 +325,7 @@ typedef struct _TEB
|
||||
@@ -640,9 +640,9 @@ index 5cd1664f1fe..ae3163daeac 100644
|
||||
+ PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */
|
||||
LONG ExceptionCode; /* 1a4/02c0 */
|
||||
ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */
|
||||
BYTE SpareBytes1[24]; /* 1bc/02e8 used for ntdll private data in Wine */
|
||||
BYTE SpareBytes1[24]; /* 1bc/02e8 */
|
||||
diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c
|
||||
index e9228a00d48..63ae977a0ae 100644
|
||||
index 1cc6465f1c6..26cd347f14e 100644
|
||||
--- a/tools/winebuild/relay.c
|
||||
+++ b/tools/winebuild/relay.c
|
||||
@@ -31,7 +31,7 @@
|
||||
@@ -652,8 +652,8 @@ index e9228a00d48..63ae977a0ae 100644
|
||||
-#define STACKOFFSET 0xc0 /* FIELD_OFFSET(TEB,WOW32Reserved) */
|
||||
+#define STACKOFFSET 0xcc /* FIELD_OFFSET(TEB,SystemReserved1[0]) */
|
||||
|
||||
/* fix this if the ntdll_thread_regs structure is changed */
|
||||
#define GS_OFFSET 0x1d8 /* FIELD_OFFSET(TEB,SpareBytes1) + FIELD_OFFSET(ntdll_thread_data,gs) */
|
||||
/* fix this if the x86_thread_data structure is changed */
|
||||
#define GS_OFFSET 0x1d8 /* FIELD_OFFSET(TEB,SystemReserved2) + FIELD_OFFSET(struct x86_thread_data,gs) */
|
||||
--
|
||||
2.12.2
|
||||
2.13.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5cdd660ebd413914330fa49e9d7014c9056662c2 Mon Sep 17 00:00:00 2001
|
||||
From 32bb8b671dd0c6df8d3cf295447b3c8f7d3b7457 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 11 May 2017 05:32:55 +0200
|
||||
Subject: winebuild: Generate syscall thunks for ntdll exports.
|
||||
@@ -16,7 +16,7 @@ Based on a patch by Erich E. Hoover.
|
||||
8 files changed, 164 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index d0f25ed3ce4..cd7d0dff493 100644
|
||||
index d3da84c7be9..f2657045c94 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -481,6 +481,7 @@ static wine_signal_handler handlers[256];
|
||||
@@ -27,16 +27,16 @@ index d0f25ed3ce4..cd7d0dff493 100644
|
||||
|
||||
enum i386_trap_code
|
||||
{
|
||||
@@ -2363,6 +2364,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
@@ -2434,6 +2435,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
*teb = addr;
|
||||
(*teb)->Tib.Self = &(*teb)->Tib;
|
||||
(*teb)->Tib.ExceptionList = (void *)~0UL;
|
||||
+ (*teb)->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
thread_data = (struct ntdll_thread_data *)(*teb)->SpareBytes1;
|
||||
thread_data = (struct x86_thread_data *)(*teb)->SystemReserved2;
|
||||
if (!(thread_data->fs = wine_ldt_alloc_fs()))
|
||||
{
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index ae3163daeac..6b0624290fa 100644
|
||||
index c11df3e53f6..80b7b91f906 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -322,7 +322,7 @@ typedef struct _TEB
|
||||
@@ -265,10 +265,10 @@ index 85bcf099999..54aad5d95b4 100644
|
||||
entry_point->u.func.nb_args = 0;
|
||||
assert( !spec->ordinals[0] );
|
||||
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
|
||||
index f3feb0f3300..dde1bd0704d 100644
|
||||
index 39733b2b0b5..b1e71ef99be 100644
|
||||
--- a/tools/winebuild/spec32.c
|
||||
+++ b/tools/winebuild/spec32.c
|
||||
@@ -274,6 +274,73 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
@@ -311,6 +311,73 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -342,7 +342,7 @@ index f3feb0f3300..dde1bd0704d 100644
|
||||
* output_exports
|
||||
*
|
||||
* Output the export table for a Win32 module.
|
||||
@@ -623,6 +690,7 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
@@ -660,6 +727,7 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
resolve_imports( spec );
|
||||
output_standard_file_header();
|
||||
output_module( spec );
|
||||
@@ -394,5 +394,5 @@ index 6e01f1a5268..925054b8bb7 100644
|
||||
+ return j + 1;
|
||||
+}
|
||||
--
|
||||
2.12.2
|
||||
2.13.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3cb1a8e8983c58da032185ca1d76bc4d3a2a15e1 Mon Sep 17 00:00:00 2001
|
||||
From 47c26e73121327980c26501ecb20cc6d6b08f3f3 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: winebuild: Add stub functions in fake dlls.
|
||||
@@ -13,7 +13,7 @@ Subject: 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 44c632bdbcf..cfbee0851b5 100644
|
||||
index f8d45d829fc..77bac0861f7 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -856,9 +856,7 @@ static void test_FakeDLL(void)
|
||||
@@ -61,7 +61,7 @@ index 44c632bdbcf..cfbee0851b5 100644
|
||||
CloseHandle(map);
|
||||
CloseHandle(file);
|
||||
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
|
||||
index cd7d0dff493..b1ec20e8723 100644
|
||||
index f2657045c94..c2375d6f0e8 100644
|
||||
--- a/dlls/ntdll/signal_i386.c
|
||||
+++ b/dlls/ntdll/signal_i386.c
|
||||
@@ -483,6 +483,45 @@ static BOOL fpux_support; /* whether the CPU supports extended fpu context */
|
||||
@@ -110,16 +110,16 @@ index cd7d0dff493..b1ec20e8723 100644
|
||||
enum i386_trap_code
|
||||
{
|
||||
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
|
||||
@@ -2365,6 +2404,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
@@ -2436,6 +2475,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
(*teb)->Tib.Self = &(*teb)->Tib;
|
||||
(*teb)->Tib.ExceptionList = (void *)~0UL;
|
||||
(*teb)->WOW32Reserved = __wine_syscall_dispatcher;
|
||||
+ (*teb)->Spare3 = __wine_fakedll_dispatcher;
|
||||
thread_data = (struct ntdll_thread_data *)(*teb)->SpareBytes1;
|
||||
thread_data = (struct x86_thread_data *)(*teb)->SystemReserved2;
|
||||
if (!(thread_data->fs = wine_ldt_alloc_fs()))
|
||||
{
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 6b0624290fa..8b87f37c65c 100644
|
||||
index 80b7b91f906..4780aca43a3 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -362,7 +362,7 @@ typedef struct _TEB
|
||||
@@ -144,10 +144,10 @@ index 3434cfe9c90..e76800bb5da 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 c01ff6d7746..4367b03b0d2 100644
|
||||
index 623d3f2d553..c6e2fec99a6 100644
|
||||
--- a/tools/winebuild/spec32.c
|
||||
+++ b/tools/winebuild/spec32.c
|
||||
@@ -701,6 +701,163 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
@@ -738,6 +738,163 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ index c01ff6d7746..4367b03b0d2 100644
|
||||
/*******************************************************************
|
||||
* output_fake_module_pass
|
||||
*
|
||||
@@ -719,7 +876,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -756,7 +913,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
const unsigned int section_align = page_size;
|
||||
const unsigned int file_align = 0x200;
|
||||
const unsigned int lfanew = (0x40 + sizeof(fakedll_signature) + 15) & ~15;
|
||||
@@ -320,7 +320,7 @@ index c01ff6d7746..4367b03b0d2 100644
|
||||
|
||||
put_word( 0x5a4d ); /* e_magic */
|
||||
put_word( 0x40 ); /* e_cblp */
|
||||
@@ -776,7 +933,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -813,7 +970,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
put_dword( 0 ); /* SizeOfUninitializedData */
|
||||
put_dword( label_rva("entrypoint") ); /* AddressOfEntryPoint */
|
||||
put_dword( label_rva("text_start") ); /* BaseOfCode */
|
||||
@@ -329,7 +329,7 @@ index c01ff6d7746..4367b03b0d2 100644
|
||||
put_pword( 0x10000000 ); /* ImageBase */
|
||||
put_dword( section_align ); /* SectionAlignment */
|
||||
put_dword( file_align ); /* FileAlignment */
|
||||
@@ -799,7 +956,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -836,7 +993,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
put_dword( 0 ); /* LoaderFlags */
|
||||
put_dword( 16 ); /* NumberOfRvaAndSizes */
|
||||
|
||||
@@ -339,7 +339,7 @@ index c01ff6d7746..4367b03b0d2 100644
|
||||
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */
|
||||
if (spec->nb_resources) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */
|
||||
{
|
||||
@@ -839,6 +997,21 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -876,6 +1034,21 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
put_word( 0 ); /* NumberOfLinenumbers */
|
||||
put_dword( 0x60000020 /* CNT_CODE|MEM_EXECUTE|MEM_READ */ ); /* Characteristics */
|
||||
|
||||
@@ -361,7 +361,7 @@ index c01ff6d7746..4367b03b0d2 100644
|
||||
/* .reloc section */
|
||||
put_data( ".reloc\0", 8 ); /* Name */
|
||||
put_dword( label_rva_align("reloc_end") - label_rva("reloc_start") ); /* VirtualSize */
|
||||
@@ -871,13 +1044,31 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -908,13 +1081,31 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
|
||||
/* .text contents */
|
||||
align_output_rva( file_align, section_align );
|
||||
@@ -442,5 +442,5 @@ index eada46604ec..eee5419285a 100644
|
||||
{
|
||||
size_t size = align - (output_buffer_pos % align);
|
||||
--
|
||||
2.12.2
|
||||
2.13.1
|
||||
|
||||
|
Reference in New Issue
Block a user