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
Added ml-patches patchset
Patches directly from the mailing list with second sign-off if supplied.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
From e54235a7c141af9b983d7d02b2a838c9adccf0da Mon Sep 17 00:00:00 2001
|
||||
From 7366d8005ea9236758e481dd41ed9a62c8abf7ce 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:46:27 +0200
|
||||
Subject: winebuild: Try to make sure RVA matches between fake and builtin
|
||||
DLLs.
|
||||
Subject: [PATCH] winebuild: Try to make sure RVA matches between fake and
|
||||
builtin DLLs.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/loader.c | 1 -
|
||||
@@ -11,10 +11,10 @@ Subject: winebuild: Try to make sure RVA matches between fake and builtin
|
||||
3 files changed, 31 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index a8f9e1f12d3..09ba7d435b0 100644
|
||||
index 3e012ff..ffc28fd 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -885,7 +885,6 @@ static void test_FakeDLL(void)
|
||||
@@ -1449,7 +1449,6 @@ static void test_FakeDLL(void)
|
||||
/* check position in memory */
|
||||
dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
|
||||
map_rva = funcs[ordinals[i]];
|
||||
@@ -23,10 +23,10 @@ index a8f9e1f12d3..09ba7d435b0 100644
|
||||
func_name, dll_rva, map_rva);
|
||||
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 89ae93503d3..8ace917d91d 100644
|
||||
index 1dcb397..677e0fe 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -395,8 +395,12 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
@@ -405,8 +405,12 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
assert( size <= page_size );
|
||||
|
||||
/* module address must be aligned on 64K boundary */
|
||||
@@ -41,7 +41,7 @@ index 89ae93503d3..8ace917d91d 100644
|
||||
|
||||
dos = (IMAGE_DOS_HEADER *)addr;
|
||||
nt = (IMAGE_NT_HEADERS *)(dos + 1);
|
||||
@@ -435,6 +439,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
@@ -453,6 +457,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
nt->OptionalHeader.SizeOfImage = data_end;
|
||||
nt->OptionalHeader.ImageBase = (ULONG_PTR)addr;
|
||||
|
||||
@@ -54,10 +54,10 @@ index 89ae93503d3..8ace917d91d 100644
|
||||
|
||||
memcpy( sec->Name, ".text", sizeof(".text") );
|
||||
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
|
||||
index 4dda31c349b..6a8a5d07ebd 100644
|
||||
index 3955982..430c7a5 100644
|
||||
--- a/tools/winebuild/spec32.c
|
||||
+++ b/tools/winebuild/spec32.c
|
||||
@@ -280,14 +280,24 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
@@ -348,14 +348,24 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
*/
|
||||
static void output_syscall_thunks( DLLSPEC *spec )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ index 4dda31c349b..6a8a5d07ebd 100644
|
||||
for (i = 0; i < spec->nb_syscalls; i++)
|
||||
{
|
||||
ORDDEF *odp = spec->syscalls[i];
|
||||
@@ -666,7 +676,14 @@ void output_module( DLLSPEC *spec )
|
||||
@@ -734,7 +744,14 @@ void output_module( DLLSPEC *spec )
|
||||
output( "\t.long 0,0\n" ); /* DataDirectory[12] */
|
||||
output( "\t.long 0,0\n" ); /* DataDirectory[13] */
|
||||
output( "\t.long 0,0\n" ); /* DataDirectory[14] */
|
||||
@@ -101,5 +101,5 @@ index 4dda31c349b..6a8a5d07ebd 100644
|
||||
output( "\n\t%s\n", get_asm_string_section() );
|
||||
output( "%s\n", asm_globl("__wine_spec_file_name") );
|
||||
--
|
||||
2.12.2
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 7a90d53abeb02bc5a7c28f9027bc924c857e1e14 Mon Sep 17 00:00:00 2001
|
||||
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: libs/wine: Use same file alignment for fake and builtin DLLs.
|
||||
Subject: [PATCH] libs/wine: Use same file alignment for fake and builtin DLLs.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/loader.c | 1 -
|
||||
@@ -9,10 +9,10 @@ Subject: libs/wine: Use same file alignment for fake and builtin DLLs.
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 09ba7d435b0..d923b958734 100644
|
||||
index ffc28fd..c9af524 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -891,7 +891,6 @@ static void test_FakeDLL(void)
|
||||
@@ -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;
|
||||
@@ -21,11 +21,11 @@ index 09ba7d435b0..d923b958734 100644
|
||||
func_name, map_offset, dll_offset);
|
||||
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 8ace917d91d..e8922c9333a 100644
|
||||
index 677e0fe..162c94d 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -450,7 +450,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
sec->SizeOfRawData = data_start - code_start;
|
||||
@@ -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;
|
||||
@@ -34,5 +34,5 @@ index 8ace917d91d..e8922c9333a 100644
|
||||
sec++;
|
||||
|
||||
--
|
||||
2.12.2
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From e6812e345ddbfdf41222de31025661cc7c66c747 Mon Sep 17 00:00:00 2001
|
||||
From 5f1d9ae2d65ad4567ea75d1a73b28b197e237e9b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 7 Sep 2017 00:38:09 +0200
|
||||
Subject: tools/winebuild: Add syscall thunks for 64 bit.
|
||||
Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/loader.c | 7 +-
|
||||
@@ -13,10 +13,10 @@ Subject: tools/winebuild: Add syscall thunks for 64 bit.
|
||||
6 files changed, 224 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index 57b2b08aeca..1a47abe5a4f 100644
|
||||
index c9af524..1ddd0f4 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -858,7 +858,7 @@ static void test_Loader(void)
|
||||
@@ -1397,7 +1397,7 @@ static void test_filenames(void)
|
||||
|
||||
static void test_FakeDLL(void)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ index 57b2b08aeca..1a47abe5a4f 100644
|
||||
NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
|
||||
IMAGE_EXPORT_DIRECTORY *dir;
|
||||
HMODULE module = GetModuleHandleA("ntdll.dll");
|
||||
@@ -900,8 +900,13 @@ static void test_FakeDLL(void)
|
||||
@@ -1439,8 +1439,13 @@ static void test_FakeDLL(void)
|
||||
|
||||
dll_func = (BYTE *)GetProcAddress(module, func_name);
|
||||
ok(dll_func != NULL, "%s: GetProcAddress returned NULL\n", func_name);
|
||||
@@ -40,10 +40,10 @@ index 57b2b08aeca..1a47abe5a4f 100644
|
||||
todo_wine ok(0, "%s: Export is a stub-function, skipping\n", func_name);
|
||||
continue;
|
||||
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
|
||||
index a74825c3c36..83bcd4d46f7 100644
|
||||
index 8ba09fe..bf21b42 100644
|
||||
--- a/dlls/ntdll/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/signal_x86_64.c
|
||||
@@ -326,6 +326,8 @@ static inline struct amd64_thread_data *amd64_thread_data(void)
|
||||
@@ -328,6 +328,8 @@ static inline struct amd64_thread_data *amd64_thread_data(void)
|
||||
return (struct amd64_thread_data *)NtCurrentTeb()->SystemReserved2;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ index a74825c3c36..83bcd4d46f7 100644
|
||||
/***********************************************************************
|
||||
* Dynamic unwind table
|
||||
*/
|
||||
@@ -2973,6 +2975,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
@@ -3278,6 +3280,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
|
||||
{
|
||||
(*teb)->Tib.Self = &(*teb)->Tib;
|
||||
(*teb)->Tib.ExceptionList = (void *)~0UL;
|
||||
@@ -61,7 +61,7 @@ index a74825c3c36..83bcd4d46f7 100644
|
||||
return status;
|
||||
}
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 86e5047facb..8b9df0cc7c0 100644
|
||||
index f807b53..40304db 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -60,6 +60,8 @@ struct _KUSER_SHARED_DATA *user_shared_data_external;
|
||||
@@ -73,7 +73,7 @@ index 86e5047facb..8b9df0cc7c0 100644
|
||||
PUNHANDLED_EXCEPTION_FILTER unhandled_exception_filter = NULL;
|
||||
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
|
||||
|
||||
@@ -89,7 +91,6 @@ static RTL_CRITICAL_SECTION_DEBUG critse
|
||||
@@ -90,7 +92,6 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
};
|
||||
static RTL_CRITICAL_SECTION peb_lock = { &critsect_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
@@ -81,7 +81,7 @@ index 86e5047facb..8b9df0cc7c0 100644
|
||||
BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
|
||||
LARGE_INTEGER *kernel, LARGE_INTEGER *user)
|
||||
{
|
||||
@@ -497,6 +498,10 @@ HANDLE thread_init(void)
|
||||
@@ -499,6 +500,10 @@ HANDLE thread_init(void)
|
||||
InitializeListHead( &ldr.InInitializationOrderModuleList );
|
||||
*(ULONG_PTR *)peb->Reserved = get_image_addr();
|
||||
|
||||
@@ -93,11 +93,11 @@ index 86e5047facb..8b9df0cc7c0 100644
|
||||
* Starting with Vista, the first user to log on has session id 1.
|
||||
* Session id 0 is for processes that don't interact with the user (like services).
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 0a64ea4a73b..e2ae56df427 100644
|
||||
index 162c94d..87eb5a8 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -455,7 +455,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
|
||||
sec->SizeOfRawData = data_start - code_start;
|
||||
@@ -468,7 +468,11 @@ 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;
|
||||
+#ifdef _WIN64
|
||||
@@ -109,7 +109,7 @@ index 0a64ea4a73b..e2ae56df427 100644
|
||||
sec++;
|
||||
|
||||
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
|
||||
index c4b9abfc9fc..064019c4404 100644
|
||||
index c4b9abf..064019c 100644
|
||||
--- a/tools/winebuild/parser.c
|
||||
+++ b/tools/winebuild/parser.c
|
||||
@@ -521,7 +521,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
|
||||
@@ -122,10 +122,10 @@ index c4b9abfc9fc..064019c4404 100644
|
||||
if (odp->flags & (FLAG_FORWARD | FLAG_REGISTER))
|
||||
return 0;
|
||||
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
|
||||
index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
index 430c7a5..48a9abe 100644
|
||||
--- a/tools/winebuild/spec32.c
|
||||
+++ b/tools/winebuild/spec32.c
|
||||
@@ -299,11 +299,11 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
@@ -342,11 +342,11 @@ static void output_relay_debug( DLLSPEC *spec )
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -139,7 +139,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
{
|
||||
const unsigned int page_size = get_page_size();
|
||||
int i;
|
||||
@@ -369,7 +369,91 @@ static void output_syscall_thunks( DLLSPEC *spec )
|
||||
@@ -412,7 +412,91 @@ static void output_syscall_thunks( DLLSPEC *spec )
|
||||
output( "1:\tpopl %%ecx\n" );
|
||||
output( "\tjmpl *(%s-1b)(%%ecx,%%eax,%d)\n", asm_name("__wine_syscall_table"), get_ptr_size() );
|
||||
}
|
||||
@@ -232,7 +232,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
output( "\tret\n" );
|
||||
output_cfi( ".cfi_endproc" );
|
||||
output_function_size( "__wine_syscall_dispatcher" );
|
||||
@@ -732,7 +816,10 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
@@ -775,7 +859,10 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
resolve_imports( spec );
|
||||
output_standard_file_header();
|
||||
output_module( spec );
|
||||
@@ -244,7 +244,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
output_stubs( spec );
|
||||
output_exports( spec );
|
||||
output_imports( spec );
|
||||
@@ -744,7 +831,7 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
@@ -787,7 +874,7 @@ void BuildSpec32File( DLLSPEC *spec )
|
||||
|
||||
static int needs_stub_exports( DLLSPEC *spec )
|
||||
{
|
||||
@@ -253,7 +253,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
return 0;
|
||||
if (!(spec->characteristics & IMAGE_FILE_DLL))
|
||||
return 0;
|
||||
@@ -754,7 +841,7 @@ static int needs_stub_exports( DLLSPEC *spec )
|
||||
@@ -797,7 +884,7 @@ static int needs_stub_exports( DLLSPEC *spec )
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
{
|
||||
int i, nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0;
|
||||
size_t rva, thunk;
|
||||
@@ -916,6 +1003,113 @@ static void create_stub_exports_text( DLLSPEC *spec )
|
||||
@@ -959,6 +1046,113 @@ static void create_stub_exports_text( DLLSPEC *spec )
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
static void create_stub_exports_data( DLLSPEC *spec )
|
||||
{
|
||||
int i;
|
||||
@@ -1115,7 +1309,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
@@ -1158,7 +1352,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
|
||||
if (needs_stub_exports( spec ))
|
||||
{
|
||||
put_label( "text_start" );
|
||||
@@ -389,4 +389,5 @@ index 6b6f4afae77..e7ae6f6eaee 100644
|
||||
}
|
||||
else
|
||||
--
|
||||
2.14.1
|
||||
1.9.1
|
||||
|
||||
|
Reference in New Issue
Block a user