Rebase against 7ccc45f754a39a425ecc2358a4cfc5675ff11ffb.

This commit is contained in:
Zebediah Figura 2020-04-28 17:41:41 -05:00
parent d33cdb84fd
commit 8a46f19ece
7 changed files with 93 additions and 158 deletions

View File

@ -1,64 +0,0 @@
From cdcb9581d105a7964b06ca9c5525e28db25d6206 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 16 Jul 2017 17:39:28 +0200
Subject: d3dx9_36/tests: Remove useless \n within some ok messages.
---
dlls/d3dx9_36/tests/mesh.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 95dd06e4662..b1ab0aaf594 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -10195,10 +10195,10 @@ static void test_clone_mesh(void)
hr = mesh->lpVtbl->CloneMesh(mesh, tc[i].clone_options, tc[i].new_declaration,
test_context->device, &mesh_clone);
- ok(hr == D3D_OK, "CloneMesh test case %d failed. Got %x\n, expected D3D_OK\n", i, hr);
+ ok(hr == D3D_OK, "CloneMesh test case %d failed. Got %x, expected D3D_OK.\n", i, hr);
hr = mesh_clone->lpVtbl->GetDeclaration(mesh_clone, new_declaration);
- ok(hr == D3D_OK, "GetDeclaration test case %d failed. Got %x\n, expected D3D_OK\n", i, hr);
+ ok(hr == D3D_OK, "GetDeclaration test case %d failed. Got %x, expected D3D_OK.\n", i, hr);
/* Check declaration elements */
for (j = 0; tc[i].new_declaration[j].Stream != 0xFF; j++)
{
@@ -10385,7 +10385,7 @@ static void test_valid_mesh(void)
hr = D3DXValidMesh(mesh, tc[i].adjacency, &errors_and_warnings);
todo_wine ok(hr == tc[i].exp_hr, "D3DXValidMesh test case %d failed. "
- "Got %x\n, expected %x\n", i, hr, tc[i].exp_hr);
+ "Got %x, expected %x.\n", i, hr, tc[i].exp_hr);
/* Note errors_and_warnings is deliberately not checked because that
* would require copying wast amounts of the text output. */
@@ -10529,7 +10529,7 @@ static void test_optimize_faces(void)
tc[i].num_vertices, tc[i].indices_are_32bit,
face_remap);
ok(hr == D3D_OK, "D3DXOptimizeFaces test case %d failed. "
- "Got %x\n, expected D3D_OK\n", i, hr);
+ "Got %x, expected D3D_OK.\n", i, hr);
/* Compare face remap with expected face remap */
for (j = 0; j < tc[i].num_faces; j++)
@@ -10547,14 +10547,14 @@ static void test_optimize_faces(void)
tc[0].num_vertices, tc[0].indices_are_32bit,
NULL);
ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces passed NULL face_remap "
- "pointer. Got %x\n, expected D3DERR_INVALIDCALL\n", hr);
+ "pointer. Got %x, expected D3DERR_INVALIDCALL.\n", hr);
/* Number of faces must be smaller than 2^15 */
hr = D3DXOptimizeFaces(tc[0].indices, 2 << 15,
tc[0].num_vertices, FALSE,
&smallest_face_remap);
ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces should not accept 2^15 "
- "faces when using 16-bit indices. Got %x\n, expected D3DERR_INVALIDCALL\n", hr);
+ "faces when using 16-bit indices. Got %x, expected D3DERR_INVALIDCALL.\n", hr);
}
static HRESULT clear_normals(ID3DXMesh *mesh)
--
2.13.1

View File

@ -1,4 +1,4 @@
From 1b90b687170f3a00093fcdf0914c9f89aea3a3bd Mon Sep 17 00:00:00 2001
From abdcbf6355b7f8d353ea15bf7d9c49c54e35910b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Mar 2017 22:56:45 +0100
Subject: [PATCH] ntdll: Fill process virtual memory counters in
@ -13,10 +13,10 @@ FIXME: fill_VM_COUNTERS now uses a different method ... which one is better?
4 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index c2466aa5bdf..6540a353fbe 100644
index a21a8bcceee..608525347ca 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2704,8 +2704,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2703,8 +2703,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
if (reply->unix_pid != -1)
@ -29,10 +29,10 @@ index c2466aa5bdf..6540a353fbe 100644
}
len += procstructlen;
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 9a487a0520d..37b4f6fca14 100644
index b4e3c7d5c83..15f72631f55 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -273,6 +273,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
@@ -297,6 +297,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
/* process / thread time */
extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN;
@ -41,10 +41,10 @@ index 9a487a0520d..37b4f6fca14 100644
/* string functions */
int __cdecl NTDLL_tolower( int c );
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 0f248378842..043aebe09bf 100644
index e59c255e327..71233f92853 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -192,7 +192,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
@@ -186,7 +186,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
{
@ -54,7 +54,7 @@ index 0f248378842..043aebe09bf 100644
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 711a8bb1898..843df8905f5 100644
index a2a999f8996..f5f932ae703 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -366,6 +366,42 @@ TEB *thread_init(void)
@ -99,7 +99,7 @@ index 711a8bb1898..843df8905f5 100644
+}
/***********************************************************************
* free_thread_data
* abort_thread
--
2.25.1
2.26.2

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "28ec2795186c7db83637b3b17e4fa95095ebb77d"
echo "7ccc45f754a39a425ecc2358a4cfc5675ff11ffb"
}
# Show version information
@ -2583,10 +2583,8 @@ fi
# | dlls/d3dx9_42/d3dx9_42.spec, dlls/d3dx9_43/d3dx9_43.spec
# |
if test "$enable_d3dx9_36_D3DXOptimizeVertices" -eq 1; then
patch_apply d3dx9_36-D3DXOptimizeVertices/0001-d3dx9_36-tests-Remove-useless-n-within-some-ok-messa.patch
patch_apply d3dx9_36-D3DXOptimizeVertices/0002-d3dx9_36-Add-semi-stub-for-D3DXOptimizeVertices.patch
(
printf '%s\n' '+ { "Christian Costa", "d3dx9_36/tests: Remove useless \\n within some ok messages.", 1 },';
printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Add semi-stub for D3DXOptimizeVertices.", 1 },';
) >> "$patchlist"
fi

View File

@ -1,4 +1,4 @@
From 62f19923f26e57889e352933b2ac0384a6b39075 Mon Sep 17 00:00:00 2001
From 6b8b1869346c8f020fdd940fb18414774e76bc1c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 18 Mar 2015 23:03:01 +0100
Subject: [PATCH] ntdll: Implement virtual_map_shared_memory.
@ -10,11 +10,11 @@ Preparation for shared memory wineserver communication.
2 files changed, 52 insertions(+)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 8af5d6f28a0..7bbe23d969b 100644
index 3e877593b64..613948c8202 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -179,6 +179,7 @@ extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_H
extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN;
@@ -204,6 +204,7 @@ extern NTSTATUS virtual_alloc_teb( TEB **teb ) DECLSPEC_HIDDEN;
extern void virtual_free_teb( TEB *teb ) DECLSPEC_HIDDEN;
extern NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_size,
SIZE_T commit_size, SIZE_T *pthread_size ) DECLSPEC_HIDDEN;
+extern NTSTATUS virtual_map_shared_memory( int fd, PVOID *addr_ptr, ULONG zero_bits, SIZE_T *size_ptr, ULONG protect ) DECLSPEC_HIDDEN;
@ -22,10 +22,10 @@ index 8af5d6f28a0..7bbe23d969b 100644
extern int virtual_handle_stack_fault( void *addr ) DECLSPEC_HIDDEN;
extern BOOL virtual_is_valid_code_address( const void *addr, SIZE_T size ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 186d7335bfc..9d284f9d8b5 100644
index 7be00a1ac2e..db88b5b30be 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -3269,6 +3269,57 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
@@ -3504,6 +3504,57 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
}
@ -84,5 +84,5 @@ index 186d7335bfc..9d284f9d8b5 100644
* NtUnmapViewOfSection (NTDLL.@)
* ZwUnmapViewOfSection (NTDLL.@)
--
2.17.1
2.26.2

View File

@ -1,11 +1,11 @@
From b2d95f8d335ec606f9779eebb3bbcbed7d4c00ad Mon Sep 17 00:00:00 2001
From f6b994d65424d14e14efb0f486781b48a4e40be0 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: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
Based on a patch by Erich E. Hoover.
---
dlls/ntdll/signal_i386.c | 6 +-
dlls/ntdll/signal_i386.c | 7 ++-
dlls/ntdll/tests/exception.c | 2 +
include/winternl.h | 2 +-
tools/winebuild/build.h | 7 +++
@ -14,13 +14,13 @@ Based on a patch by Erich E. Hoover.
tools/winebuild/spec16.c | 22 +-------
tools/winebuild/spec32.c | 104 +++++++++++++++++++++++++++++++++++
tools/winebuild/utils.c | 21 +++++++
9 files changed, 206 insertions(+), 27 deletions(-)
9 files changed, 207 insertions(+), 27 deletions(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 5d01acd00fc..0b2a62fe1a8 100644
index c9ddb1fcc7b..243eded1b77 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -481,6 +481,9 @@ static ULONG first_ldt_entry = 32;
@@ -479,6 +479,9 @@ static ULONG first_ldt_entry = 32;
static wine_signal_handler handlers[256];
@ -30,7 +30,7 @@ index 5d01acd00fc..0b2a62fe1a8 100644
enum i386_trap_code
{
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
@@ -1519,7 +1522,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
@@ -1517,7 +1520,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
{
context->Ebp = ebp;
context->Esp = (DWORD)&retaddr;
@ -39,14 +39,15 @@ index 5d01acd00fc..0b2a62fe1a8 100644
context->SegCs = get_cs();
context->SegSs = get_ds();
context->EFlags = eflags;
@@ -2613,6 +2616,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 x86_thread_data *)(*teb)->SystemReserved2;
if (!(thread_data->fs = ldt_alloc_fs( *teb, first_thread )))
{
@@ -2582,6 +2585,8 @@ NTSTATUS signal_alloc_thread( TEB *teb )
}
else thread_data->fs = gdt_fs_sel;
+ teb->WOW32Reserved = __wine_syscall_dispatcher;
+
return STATUS_SUCCESS;
}
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 72afb0a3764..fbd90661ee0 100644
--- a/dlls/ntdll/tests/exception.c
@ -61,7 +62,7 @@ index 72afb0a3764..fbd90661ee0 100644
ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
diff --git a/include/winternl.h b/include/winternl.h
index d4316092e05..9e9a5eb819e 100644
index 93dd30482da..becb53e1261 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -359,7 +359,7 @@ typedef struct _TEB
@ -74,7 +75,7 @@ index d4316092e05..9e9a5eb819e 100644
ULONG FpSoftwareStatusRegister; /* 0c8/010c */
PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 65493ec37fb..b701f0660e4 100644
index b30785b74a3..6ee847f908c 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -105,6 +105,7 @@ typedef struct
@ -112,7 +113,7 @@ index 65493ec37fb..b701f0660e4 100644
#define FLAG_CPU_MASK (FLAG_CPU(CPU_LAST + 1) - FLAG_CPU(0))
#define FLAG_CPU_WIN64 (FLAG_CPU(CPU_x86_64) | FLAG_CPU(CPU_ARM64))
#define FLAG_CPU_WIN32 (FLAG_CPU_MASK & ~FLAG_CPU_WIN64)
@@ -326,6 +331,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
@@ -327,6 +332,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
extern int parse_spec_file( FILE *file, DLLSPEC *spec );
extern int parse_def_file( FILE *file, DLLSPEC *spec );
@ -162,7 +163,7 @@ index 04ab433dd65..0c6bafed8e5 100644
}
}
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index be705c25f0f..004b6aea7ab 100644
index 0f2b9c1e10a..74216f8bb6e 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -543,6 +543,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
@ -293,7 +294,7 @@ index a52c03aaa6a..15ef9a3f893 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 ecfe4c50113..fa7984e1a38 100644
index b1e20e0484d..22dd399cb2b 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -374,6 +374,109 @@ static void output_relay_debug( DLLSPEC *spec )
@ -406,7 +407,7 @@ index ecfe4c50113..fa7984e1a38 100644
/*******************************************************************
* output_exports
*
@@ -770,6 +873,7 @@ void output_spec32_file( DLLSPEC *spec )
@@ -729,6 +832,7 @@ void output_spec32_file( DLLSPEC *spec )
open_output_file();
output_standard_file_header();
output_module( spec );
@ -415,7 +416,7 @@ index ecfe4c50113..fa7984e1a38 100644
output_exports( spec );
output_imports( spec );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index be877080486..63aeeca4468 100644
index 669520711c2..7dc61a708db 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -854,6 +854,7 @@ void free_dll_spec( DLLSPEC *spec )
@ -434,7 +435,7 @@ index be877080486..63aeeca4468 100644
free( spec );
}
@@ -1281,3 +1283,22 @@ const char *get_asm_string_section(void)
@@ -1269,3 +1271,22 @@ const char *get_asm_string_section(void)
default: return ".section .rodata";
}
}
@ -458,5 +459,5 @@ index be877080486..63aeeca4468 100644
+ return j + 1;
+}
--
2.25.1
2.26.2

View File

@ -1,4 +1,4 @@
From ef002efad2f2ef4fcbc9aab1a91acaccdb7a846e Mon Sep 17 00:00:00 2001
From 5b939ad020141bf9a33bb54d7eec7f0c730b9669 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, 249 insertions(+), 15 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index e72dea9ca51..bf3cf00f964 100644
index 4e7a15970cb..ec173c94a8e 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1560,9 +1560,7 @@ static void test_FakeDLL(void)
@ -61,10 +61,10 @@ index e72dea9ca51..bf3cf00f964 100644
CloseHandle(map);
CloseHandle(file);
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 915b344aabe..8cb19f68ec1 100644
index 243eded1b77..2cd672ad165 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -484,6 +484,39 @@ static wine_signal_handler handlers[256];
@@ -482,6 +482,39 @@ static wine_signal_handler handlers[256];
extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
extern NTSTATUS WINAPI __syscall_NtGetContextThread( HANDLE handle, CONTEXT *context );
@ -104,16 +104,16 @@ index 915b344aabe..8cb19f68ec1 100644
enum i386_trap_code
{
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
@@ -2603,6 +2636,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
(*teb)->Tib.Self = &(*teb)->Tib;
(*teb)->Tib.ExceptionList = (void *)~0UL;
(*teb)->WOW32Reserved = __wine_syscall_dispatcher;
+ (*teb)->Spare2 = __wine_fakedll_dispatcher;
thread_data = (struct x86_thread_data *)(*teb)->SystemReserved2;
if (!(thread_data->fs = ldt_alloc_fs( *teb, first_thread )))
{
@@ -2586,6 +2619,7 @@ NTSTATUS signal_alloc_thread( TEB *teb )
else thread_data->fs = gdt_fs_sel;
teb->WOW32Reserved = __wine_syscall_dispatcher;
+ teb->Spare2 = __wine_fakedll_dispatcher;
return STATUS_SUCCESS;
}
diff --git a/include/winternl.h b/include/winternl.h
index e469012b236..24a41a9f95d 100644
index becb53e1261..94ab0046b5f 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -398,7 +398,7 @@ typedef struct _TEB
@ -126,10 +126,10 @@ index e469012b236..24a41a9f95d 100644
PVOID ReservedForPerf; /* f7c/1750 */
PVOID ReservedForOle; /* f80/1758 */
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index e0d33036440..6712a694773 100644
index 210324406a9..1d296d42463 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -357,6 +357,7 @@ extern void put_word( unsigned short val );
@@ -358,6 +358,7 @@ extern void put_word( unsigned short val );
extern void put_dword( unsigned int val );
extern void put_qword( unsigned int val );
extern void put_pword( unsigned int val );
@ -138,10 +138,10 @@ index e0d33036440..6712a694773 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..692db4c7e0b 100644
index c38f1fe663c..bf82ca497c0 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -884,6 +884,163 @@ void output_spec32_file( DLLSPEC *spec )
@@ -843,6 +843,163 @@ void output_spec32_file( DLLSPEC *spec )
}
@ -305,7 +305,7 @@ index e67cb48cd08..692db4c7e0b 100644
/*******************************************************************
* output_fake_module_pass
*
@@ -902,7 +1059,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -861,7 +1018,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
const unsigned int file_align = 0x200;
const unsigned int reloc_size = 8;
const unsigned int lfanew = (0x40 + sizeof(fakedll_signature) + 15) & ~15;
@ -314,7 +314,7 @@ index e67cb48cd08..692db4c7e0b 100644
put_word( 0x5a4d ); /* e_magic */
put_word( 0x40 ); /* e_cblp */
@@ -959,7 +1116,7 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -918,7 +1075,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 */
@ -323,7 +323,7 @@ index e67cb48cd08..692db4c7e0b 100644
put_pword( 0x10000000 ); /* ImageBase */
put_dword( section_align ); /* SectionAlignment */
put_dword( file_align ); /* FileAlignment */
@@ -982,7 +1139,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -941,7 +1098,8 @@ static void output_fake_module_pass( DLLSPEC *spec )
put_dword( 0 ); /* LoaderFlags */
put_dword( 16 ); /* NumberOfRvaAndSizes */
@ -333,7 +333,7 @@ index e67cb48cd08..692db4c7e0b 100644
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */
if (spec->nb_resources) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */
{
@@ -1022,6 +1180,21 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -981,6 +1139,21 @@ static void output_fake_module_pass( DLLSPEC *spec )
put_word( 0 ); /* NumberOfLinenumbers */
put_dword( 0x60000020 /* CNT_CODE|MEM_EXECUTE|MEM_READ */ ); /* Characteristics */
@ -355,7 +355,7 @@ index e67cb48cd08..692db4c7e0b 100644
/* .reloc section */
put_data( ".reloc\0", 8 ); /* Name */
put_dword( label_rva_align("reloc_end") - label_rva("reloc_start") ); /* VirtualSize */
@@ -1054,13 +1227,31 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -1013,13 +1186,31 @@ static void output_fake_module_pass( DLLSPEC *spec )
/* .text contents */
align_output_rva( file_align, section_align );
@ -394,7 +394,7 @@ index e67cb48cd08..692db4c7e0b 100644
/* .reloc contents */
align_output_rva( file_align, section_align );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index b0be1b594b3..b1e34c5da18 100644
index 64e1fa51455..edb983a65c9 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -549,7 +549,7 @@ size_t output_buffer_size;
@ -436,5 +436,5 @@ index b0be1b594b3..b1e34c5da18 100644
{
size_t size = align - (output_buffer_pos % align);
--
2.26.0
2.26.2

View File

@ -1,4 +1,4 @@
From 76abfa6c07701466a7a14bfeeaad64e357f54a1c Mon Sep 17 00:00:00 2001
From 6037ccdc09121a1602089e7dcf50d7739a69114f 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: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
@ -13,10 +13,10 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
6 files changed, 302 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 78fed489e9..47309b53ed 100644
index 5373dc4efe1..67d04876bd6 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1536,7 +1536,7 @@ static void test_filenames(void)
@@ -1537,7 +1537,7 @@ static void test_filenames(void)
static void test_FakeDLL(void)
{
@ -25,7 +25,7 @@ index 78fed489e9..47309b53ed 100644
NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
IMAGE_EXPORT_DIRECTORY *dir;
HMODULE module = GetModuleHandleA("ntdll.dll");
@@ -1578,8 +1578,13 @@ static void test_FakeDLL(void)
@@ -1579,8 +1579,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 78fed489e9..47309b53ed 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 c372f65b34..e48529d73a 100644
index 31af1e98d3f..324a92b41a9 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -355,6 +355,7 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex
@@ -354,6 +354,7 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex
#endif
}
@ -51,16 +51,16 @@ index c372f65b34..e48529d73a 100644
/***********************************************************************
* Definitions for Win32 unwind tables
@@ -3133,6 +3134,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
{
(*teb)->Tib.Self = &(*teb)->Tib;
(*teb)->Tib.ExceptionList = (void *)~0UL;
+ (*teb)->WOW32Reserved = __wine_syscall_dispatcher;
}
return status;
@@ -3119,6 +3120,7 @@ void signal_init_threading(void)
*/
NTSTATUS signal_alloc_thread( TEB *teb )
{
+ teb->WOW32Reserved = __wine_syscall_dispatcher;
return STATUS_SUCCESS;
}
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index ca01e0df8c..b939724704 100644
index 1650c17295a..0acc4d88524 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -63,6 +63,8 @@ struct _KUSER_SHARED_DATA *user_shared_data_external;
@ -72,7 +72,7 @@ index ca01e0df8c..b939724704 100644
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
/* info passed to a starting thread */
@@ -326,6 +328,14 @@ TEB *thread_init(void)
@@ -327,6 +329,14 @@ TEB *thread_init(void)
InitializeListHead( &ldr.InInitializationOrderModuleList );
*(ULONG_PTR *)peb->Reserved = get_image_addr();
@ -88,10 +88,10 @@ index ca01e0df8c..b939724704 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 b6cac2ab92..682d18f8da 100644
index 4597a6cb324..3d0d75e9c6d 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -467,7 +467,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
@@ -398,7 +398,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;
@ -104,7 +104,7 @@ index b6cac2ab92..682d18f8da 100644
sec++;
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index 004b6aea7a..40946409c5 100644
index 74216f8bb6e..820516329a4 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -545,7 +545,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
@ -117,10 +117,10 @@ index 004b6aea7a..40946409c5 100644
if (odp->flags & (FLAG_FORWARD | FLAG_REGISTER))
return 0;
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 800cb23023..19046e5a50 100644
index 07d6eed05fc..9cc4698d0d7 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -372,11 +372,11 @@ static void output_relay_debug( DLLSPEC *spec )
@@ -375,11 +375,11 @@ static void output_relay_debug( DLLSPEC *spec )
}
/*******************************************************************
@ -134,7 +134,7 @@ index 800cb23023..19046e5a50 100644
{
const unsigned int page_size = get_page_size();
int i;
@@ -485,6 +485,157 @@ static void output_syscall_thunks( DLLSPEC *spec )
@@ -488,6 +488,157 @@ static void output_syscall_thunks( DLLSPEC *spec )
output_function_size( "__wine_syscall_dispatcher" );
}
@ -292,7 +292,7 @@ index 800cb23023..19046e5a50 100644
/*******************************************************************
* output_exports
*
@@ -883,7 +1034,10 @@ void output_spec32_file( DLLSPEC *spec )
@@ -845,7 +996,10 @@ void output_spec32_file( DLLSPEC *spec )
open_output_file();
output_standard_file_header();
output_module( spec );
@ -304,7 +304,7 @@ index 800cb23023..19046e5a50 100644
output_stubs( spec );
output_exports( spec );
output_imports( spec );
@@ -896,7 +1050,7 @@ void output_spec32_file( DLLSPEC *spec )
@@ -858,7 +1012,7 @@ void output_spec32_file( DLLSPEC *spec )
static int needs_stub_exports( DLLSPEC *spec )
{
@ -313,7 +313,7 @@ index 800cb23023..19046e5a50 100644
return 0;
if (!(spec->characteristics & IMAGE_FILE_DLL))
return 0;
@@ -906,7 +1060,7 @@ static int needs_stub_exports( DLLSPEC *spec )
@@ -868,7 +1022,7 @@ static int needs_stub_exports( DLLSPEC *spec )
}
@ -322,7 +322,7 @@ index 800cb23023..19046e5a50 100644
{
int i, nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0;
size_t rva, thunk;
@@ -1064,6 +1218,122 @@ static void create_stub_exports_text( DLLSPEC *spec )
@@ -1026,6 +1180,122 @@ static void create_stub_exports_text( DLLSPEC *spec )
}
@ -445,7 +445,7 @@ index 800cb23023..19046e5a50 100644
static void create_stub_exports_data( DLLSPEC *spec )
{
int i;
@@ -1263,7 +1533,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -1225,7 +1495,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
if (needs_stub_exports( spec ))
{
put_label( "text_start" );
@ -458,5 +458,5 @@ index 800cb23023..19046e5a50 100644
}
else
--
2.23.0
2.26.2