Rebase against 6d35c10a7b7155dd552a3ad1a266d205e38f8765

This commit is contained in:
Alistair Leslie-Hughes
2019-03-05 08:05:01 +11:00
parent 923434cd32
commit d3067e60ff
12 changed files with 115 additions and 648 deletions

View File

@@ -1,4 +1,4 @@
From ace0554b58cca60956b36f1161c9c0c2a8df5510 Mon Sep 17 00:00:00 2001
From a3072f7d1387b22f73e947631a1b8d452e944976 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.
@@ -8,16 +8,16 @@ Based on a patch by Erich E. Hoover.
dlls/ntdll/signal_i386.c | 6 ++-
dlls/ntdll/tests/exception.c | 2 +
include/winternl.h | 2 +-
tools/winebuild/build.h | 8 ++-
tools/winebuild/import.c | 10 ++--
tools/winebuild/parser.c | 59 ++++++++++++++++++++++
tools/winebuild/spec16.c | 22 +--------
tools/winebuild/spec32.c | 94 ++++++++++++++++++++++++++++++++++++
tools/winebuild/utils.c | 21 ++++++++
tools/winebuild/build.h | 8 +++-
tools/winebuild/import.c | 10 +++--
tools/winebuild/parser.c | 59 +++++++++++++++++++++++++++
tools/winebuild/spec16.c | 22 +----------
tools/winebuild/spec32.c | 94 ++++++++++++++++++++++++++++++++++++++++++++
tools/winebuild/utils.c | 21 ++++++++++
9 files changed, 196 insertions(+), 28 deletions(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index daf9ae23..8dfcd0b5 100644
index e62a3c3..b504074 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -427,6 +427,9 @@ static size_t signal_stack_size;
@@ -30,7 +30,7 @@ index daf9ae23..8dfcd0b5 100644
enum i386_trap_code
{
TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */
@@ -1430,7 +1433,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
@@ -1448,7 +1451,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi,
{
context->Ebp = ebp;
context->Esp = (DWORD)&retaddr;
@@ -39,7 +39,7 @@ index daf9ae23..8dfcd0b5 100644
context->SegCs = wine_get_cs();
context->SegSs = wine_get_ss();
context->EFlags = eflags;
@@ -2317,6 +2320,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
@@ -2348,6 +2351,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
*teb = addr;
(*teb)->Tib.Self = &(*teb)->Tib;
(*teb)->Tib.ExceptionList = (void *)~0UL;
@@ -48,10 +48,10 @@ index daf9ae23..8dfcd0b5 100644
if (!(thread_data->fs = wine_ldt_alloc_fs()))
{
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index b8bd1866..e795ab14 100644
index 78cf355..b68fe58 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1618,6 +1618,8 @@ static void test_thread_context(void)
@@ -1632,6 +1632,8 @@ static void test_thread_context(void)
ok( (char *)context.Eip >= (char *)pNtGetContextThread - 0x10000 &&
(char *)context.Eip <= (char *)pNtGetContextThread + 0x10000,
"wrong Eip %08x/%08x\n", context.Eip, (DWORD)pNtGetContextThread );
@@ -61,10 +61,10 @@ index b8bd1866..e795ab14 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 12edd637..5d128b46 100644
index 2d487ea..8e8b629 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -357,7 +357,7 @@ typedef struct _TEB
@@ -358,7 +358,7 @@ typedef struct _TEB
PVOID CsrClientThread; /* 03c/0070 */
PVOID Win32ThreadInfo; /* 040/0078 */
ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */
@@ -74,7 +74,7 @@ index 12edd637..5d128b46 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 eee98ebe..e883420c 100644
index d7b46a6..b8ab56e 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -102,6 +102,7 @@ typedef struct
@@ -112,7 +112,7 @@ index eee98ebe..e883420c 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)
@@ -314,6 +318,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );
@@ -317,6 +321,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 );
@@ -122,7 +122,7 @@ index eee98ebe..e883420c 100644
extern int byte_swapped;
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 893691ea..c39d9b53 100644
index 6ab7765..628b817 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -451,6 +451,7 @@ static void check_undefined_forwards( DLLSPEC *spec )
@@ -162,7 +162,7 @@ index 893691ea..c39d9b53 100644
}
}
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index dfb7f6f8..b758ca0d 100644
index dfb7f6f..b758ca0 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -547,6 +547,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
@@ -253,14 +253,13 @@ index dfb7f6f8..b758ca0d 100644
}
diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
index 85bcf099..54aad5d9 100644
index 027580b..6163407 100644
--- a/tools/winebuild/spec16.c
+++ b/tools/winebuild/spec16.c
@@ -493,27 +493,6 @@ static int relay_type_compare( const void *e1, const void *e2 )
}
@@ -494,27 +494,6 @@ static int relay_type_compare( const void *e1, const void *e2 )
-/*******************************************************************
/*******************************************************************
- * sort_func_list
- *
- * Sort a list of functions, removing duplicates.
@@ -281,9 +280,10 @@ index 85bcf099..54aad5d9 100644
-}
-
-
/*******************************************************************
-/*******************************************************************
* output_module16
*
* Output code for a 16-bit module.
@@ -542,6 +521,7 @@ static void output_module16( DLLSPEC *spec )
entry_point->flags = FLAG_REGISTER;
entry_point->name = NULL;
@@ -293,14 +293,13 @@ index 85bcf099..54aad5d9 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 44d1c2c4..9727601f 100644
index 89f33c8..dc63c39 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -342,6 +342,99 @@ static void output_relay_debug( DLLSPEC *spec )
}
@@ -357,6 +357,99 @@ static void output_relay_debug( DLLSPEC *spec )
}
+/*******************************************************************
/*******************************************************************
+ * output_syscall_thunks
+ *
+ * Output entry points for system call functions
@@ -393,11 +392,12 @@ index 44d1c2c4..9727601f 100644
+ output_function_size( "__wine_syscall_dispatcher" );
+}
+
/*******************************************************************
+/*******************************************************************
* output_exports
*
@@ -691,6 +784,7 @@ void BuildSpec32File( DLLSPEC *spec )
resolve_imports( spec );
* Output the export table for a Win32 module.
@@ -706,6 +799,7 @@ void BuildSpec32File( DLLSPEC *spec )
open_output_file();
output_standard_file_header();
output_module( spec );
+ output_syscall_thunks( spec );
@@ -405,10 +405,10 @@ index 44d1c2c4..9727601f 100644
output_exports( spec );
output_imports( spec );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 78e96454..bb9e8ac3 100644
index 06c3d39..f331903 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -795,6 +795,7 @@ void free_dll_spec( DLLSPEC *spec )
@@ -839,6 +839,7 @@ void free_dll_spec( DLLSPEC *spec )
free( odp->name );
free( odp->export_name );
free( odp->link_name );
@@ -416,7 +416,7 @@ index 78e96454..bb9e8ac3 100644
}
free( spec->file_name );
free( spec->dll_name );
@@ -804,6 +805,7 @@ void free_dll_spec( DLLSPEC *spec )
@@ -848,6 +849,7 @@ void free_dll_spec( DLLSPEC *spec )
free( spec->names );
free( spec->ordinals );
free( spec->resources );
@@ -424,7 +424,7 @@ index 78e96454..bb9e8ac3 100644
free( spec );
}
@@ -1131,3 +1133,22 @@ const char *get_asm_string_section(void)
@@ -1175,3 +1177,22 @@ const char *get_asm_string_section(void)
default: return ".section .rodata";
}
}
@@ -448,5 +448,5 @@ index 78e96454..bb9e8ac3 100644
+ return j + 1;
+}
--
2.20.1
1.9.1

View File

@@ -1,7 +1,7 @@
From 135039777d3d6a79580661221cf4f394d390d5fb Mon Sep 17 00:00:00 2001
From 86345de0628fe7d467f25797c532a3a11e5b61eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 15 May 2017 02:05:49 +0200
Subject: winebuild: Use multipass label system to generate fake dlls.
Subject: [PATCH] winebuild: Use multipass label system to generate fake dlls.
---
tools/winebuild/build.h | 6 ++
@@ -11,10 +11,10 @@ Subject: winebuild: Use multipass label system to generate fake dlls.
4 files changed, 180 insertions(+), 64 deletions(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index e338c9c8024..3434cfe9c90 100644
index b8ab56e..218b721 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -328,6 +328,7 @@ extern size_t input_buffer_pos;
@@ -332,6 +332,7 @@ extern size_t input_buffer_pos;
extern size_t input_buffer_size;
extern unsigned char *output_buffer;
extern size_t output_buffer_pos;
@@ -22,7 +22,7 @@ index e338c9c8024..3434cfe9c90 100644
extern size_t output_buffer_size;
extern void init_input_buffer( const char *file );
@@ -343,6 +344,11 @@ extern void put_dword( unsigned int val );
@@ -347,6 +348,11 @@ extern void put_dword( unsigned int val );
extern void put_qword( unsigned int val );
extern void put_pword( unsigned int val );
extern void align_output( unsigned int align );
@@ -35,7 +35,7 @@ index e338c9c8024..3434cfe9c90 100644
/* global variables */
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index 1686f567185..8db3213fbbd 100644
index b20dfb4..2f35918 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -534,7 +534,6 @@ void output_bin_resources( DLLSPEC *spec, unsigned int start_rva )
@@ -47,10 +47,10 @@ index 1686f567185..8db3213fbbd 100644
/* output the resource directories */
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index dde1bd0704d..c01ff6d7746 100644
index dc63c39..59cced1 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -702,11 +702,11 @@ void BuildSpec32File( DLLSPEC *spec )
@@ -811,11 +811,11 @@ void BuildSpec32File( DLLSPEC *spec )
/*******************************************************************
@@ -65,7 +65,7 @@ index dde1bd0704d..c01ff6d7746 100644
{
static const unsigned char dll_code_section[] = { 0x31, 0xc0, /* xor %eax,%eax */
0xc2, 0x0c, 0x00 }; /* ret $12 */
@@ -718,22 +718,8 @@ void output_fake_module( DLLSPEC *spec )
@@ -827,22 +827,8 @@ void output_fake_module( DLLSPEC *spec )
const unsigned int page_size = get_page_size();
const unsigned int section_align = page_size;
const unsigned int file_align = 0x200;
@@ -88,7 +88,7 @@ index dde1bd0704d..c01ff6d7746 100644
put_word( 0x5a4d ); /* e_magic */
put_word( 0x40 ); /* e_cblp */
@@ -761,7 +747,7 @@ void output_fake_module( DLLSPEC *spec )
@@ -870,7 +856,7 @@ void output_fake_module( DLLSPEC *spec )
put_dword( lfanew );
put_data( fakedll_signature, sizeof(fakedll_signature) );
@@ -97,7 +97,7 @@ index dde1bd0704d..c01ff6d7746 100644
put_dword( 0x4550 ); /* Signature */
switch(target_cpu)
@@ -785,11 +771,11 @@ void output_fake_module( DLLSPEC *spec )
@@ -894,11 +880,11 @@ void output_fake_module( DLLSPEC *spec )
IMAGE_NT_OPTIONAL_HDR32_MAGIC ); /* Magic */
put_byte( 7 ); /* MajorLinkerVersion */
put_byte( 10 ); /* MinorLinkerVersion */
@@ -112,7 +112,7 @@ index dde1bd0704d..c01ff6d7746 100644
if (get_ptr_size() == 4) put_dword( 0 ); /* BaseOfData */
put_pword( 0x10000000 ); /* ImageBase */
put_dword( section_align ); /* SectionAlignment */
@@ -801,8 +787,8 @@ void output_fake_module( DLLSPEC *spec )
@@ -910,8 +896,8 @@ void output_fake_module( DLLSPEC *spec )
put_word( spec->subsystem_major ); /* MajorSubsystemVersion */
put_word( spec->subsystem_minor ); /* MinorSubsystemVersion */
put_dword( 0 ); /* Win32VersionValue */
@@ -123,7 +123,7 @@ index dde1bd0704d..c01ff6d7746 100644
put_dword( 0 ); /* CheckSum */
put_word( spec->subsystem ); /* Subsystem */
put_word( spec->dll_characteristics ); /* DllCharacteristics */
@@ -815,10 +801,10 @@ void output_fake_module( DLLSPEC *spec )
@@ -924,10 +910,10 @@ void output_fake_module( DLLSPEC *spec )
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */
@@ -137,7 +137,7 @@ index dde1bd0704d..c01ff6d7746 100644
}
else
{
@@ -828,8 +814,8 @@ void output_fake_module( DLLSPEC *spec )
@@ -937,8 +923,8 @@ void output_fake_module( DLLSPEC *spec )
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXCEPTION] */
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] */
@@ -148,7 +148,7 @@ index dde1bd0704d..c01ff6d7746 100644
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG] */
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_COPYRIGHT] */
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_GLOBALPTR] */
@@ -842,62 +828,95 @@ void output_fake_module( DLLSPEC *spec )
@@ -951,62 +937,95 @@ void output_fake_module( DLLSPEC *spec )
put_dword( 0 ); put_dword( 0 ); /* DataDirectory[15] */
/* .text section */
@@ -280,7 +280,7 @@ index dde1bd0704d..c01ff6d7746 100644
}
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 925054b8bb7..eada46604ec 100644
index f331903..7188d10 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -37,6 +37,7 @@
@@ -291,7 +291,7 @@ index 925054b8bb7..eada46604ec 100644
#include "build.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
@@ -518,8 +519,86 @@ size_t input_buffer_pos;
@@ -522,8 +523,86 @@ size_t input_buffer_pos;
size_t input_buffer_size;
unsigned char *output_buffer;
size_t output_buffer_pos;
@@ -378,7 +378,7 @@ index 925054b8bb7..eada46604ec 100644
static void check_output_buffer_space( size_t size )
{
if (output_buffer_pos + size >= output_buffer_size)
@@ -556,7 +635,9 @@ void init_output_buffer(void)
@@ -560,7 +639,9 @@ void init_output_buffer(void)
{
output_buffer_size = 1024;
output_buffer_pos = 0;
@@ -388,15 +388,15 @@ index 925054b8bb7..eada46604ec 100644
}
void flush_output_buffer(void)
@@ -564,6 +645,7 @@ void flush_output_buffer(void)
if (fwrite( output_buffer, 1, output_buffer_pos, output_file ) != output_buffer_pos)
@@ -570,6 +651,7 @@ void flush_output_buffer(void)
fatal_error( "Error writing to %s\n", output_file_name );
close_output_file();
free( output_buffer );
+ free_labels();
}
unsigned char get_byte(void)
@@ -603,12 +685,14 @@ void put_data( const void *data, size_t size )
@@ -609,12 +691,14 @@ void put_data( const void *data, size_t size )
check_output_buffer_space( size );
memcpy( output_buffer + output_buffer_pos, data, size );
output_buffer_pos += size;
@@ -411,7 +411,7 @@ index 925054b8bb7..eada46604ec 100644
}
void put_word( unsigned short val )
@@ -655,6 +739,14 @@ void align_output( unsigned int align )
@@ -661,6 +745,14 @@ void align_output( unsigned int align )
output_buffer_pos += size;
}
@@ -427,5 +427,5 @@ index 925054b8bb7..eada46604ec 100644
void output_standard_file_header(void)
{
--
2.12.2
1.9.1

View File

@@ -1,4 +1,4 @@
From 41b39da1e8fe850985da5f90bee3df26742bf2fc Mon Sep 17 00:00:00 2001
From d7aefc52dbb93e36fb89acec49a349cb039fb7e8 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.
@@ -6,17 +6,17 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
---
dlls/kernel32/tests/loader.c | 7 +-
dlls/ntdll/signal_x86_64.c | 3 +
dlls/ntdll/thread.c | 6 +
dlls/ntdll/thread.c | 6 ++
libs/wine/loader.c | 4 +
tools/winebuild/parser.c | 2 +-
tools/winebuild/spec32.c | 209 ++++++++++++++++++++++++++++++++++-
tools/winebuild/spec32.c | 209 +++++++++++++++++++++++++++++++++++++++++--
6 files changed, 223 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 3908fc75a0a..5154db69dcc 100644
index 028a187..c97ee75 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1563,7 +1563,7 @@ static void test_filenames(void)
@@ -1564,7 +1564,7 @@ static void test_filenames(void)
static void test_FakeDLL(void)
{
@@ -25,7 +25,7 @@ index 3908fc75a0a..5154db69dcc 100644
NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
IMAGE_EXPORT_DIRECTORY *dir;
HMODULE module = GetModuleHandleA("ntdll.dll");
@@ -1605,8 +1605,13 @@ static void test_FakeDLL(void)
@@ -1606,8 +1606,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,7 +40,7 @@ index 3908fc75a0a..5154db69dcc 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 ea55388f4b2..a5d4364dfa5 100644
index 54871b8..0ce0c22 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -328,6 +328,8 @@ static inline struct amd64_thread_data *amd64_thread_data(void)
@@ -61,7 +61,7 @@ index ea55388f4b2..a5d4364dfa5 100644
return status;
}
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 56c68e5e891..85c4cf52721 100644
index 1c09344..afe5731 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 56c68e5e891..85c4cf52721 100644
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
/* info passed to a starting thread */
@@ -494,6 +496,10 @@ void thread_init(void)
@@ -301,6 +303,10 @@ void thread_init(void)
InitializeListHead( &ldr.InInitializationOrderModuleList );
*(ULONG_PTR *)peb->Reserved = get_image_addr();
@@ -85,7 +85,7 @@ index 56c68e5e891..85c4cf52721 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 162c94d2921..87eb5a85ad4 100644
index 162c94d..87eb5a8 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -468,7 +468,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
@@ -101,10 +101,10 @@ index 162c94d2921..87eb5a85ad4 100644
sec++;
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index c4b9abfc9fc..064019c4404 100644
index b758ca0..3e69540 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 )
@@ -549,7 +549,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
static int needs_syscall( ORDDEF *odp, DLLSPEC *spec )
{
@@ -114,10 +114,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 d2fd6a6bfa7..403aad5560d 100644
index 3b18b6f..77bc8b4 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -342,11 +342,11 @@ static void output_relay_debug( DLLSPEC *spec )
@@ -357,11 +357,11 @@ static void output_relay_debug( DLLSPEC *spec )
}
/*******************************************************************
@@ -131,11 +131,10 @@ index d2fd6a6bfa7..403aad5560d 100644
{
const unsigned int page_size = get_page_size();
int i;
@@ -444,6 +444,90 @@ static void output_syscall_thunks( DLLSPEC *spec )
output_function_size( "__wine_syscall_dispatcher" );
@@ -460,6 +460,90 @@ static void output_syscall_thunks( DLLSPEC *spec )
}
+/*******************************************************************
/*******************************************************************
+ * output_syscall_thunks_x64
+ *
+ * Output entry points for system call functions
@@ -219,11 +218,12 @@ index d2fd6a6bfa7..403aad5560d 100644
+ output_function_size( "__wine_syscall_dispatcher" );
+}
+
/*******************************************************************
+/*******************************************************************
* output_exports
*
@@ -801,7 +885,10 @@ void BuildSpec32File( DLLSPEC *spec )
resolve_imports( spec );
* Output the export table for a Win32 module.
@@ -816,7 +900,10 @@ void BuildSpec32File( DLLSPEC *spec )
open_output_file();
output_standard_file_header();
output_module( spec );
- output_syscall_thunks( spec );
@@ -234,7 +234,7 @@ index d2fd6a6bfa7..403aad5560d 100644
output_stubs( spec );
output_exports( spec );
output_imports( spec );
@@ -813,7 +900,7 @@ void BuildSpec32File( DLLSPEC *spec )
@@ -829,7 +916,7 @@ void BuildSpec32File( DLLSPEC *spec )
static int needs_stub_exports( DLLSPEC *spec )
{
@@ -243,7 +243,7 @@ index d2fd6a6bfa7..403aad5560d 100644
return 0;
if (!(spec->characteristics & IMAGE_FILE_DLL))
return 0;
@@ -823,7 +910,7 @@ static int needs_stub_exports( DLLSPEC *spec )
@@ -839,7 +926,7 @@ static int needs_stub_exports( DLLSPEC *spec )
}
@@ -252,7 +252,7 @@ index d2fd6a6bfa7..403aad5560d 100644
{
int i, nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0;
size_t rva, thunk;
@@ -985,6 +1072,113 @@ static void create_stub_exports_text( DLLSPEC *spec )
@@ -1001,6 +1088,113 @@ static void create_stub_exports_text( DLLSPEC *spec )
}
@@ -366,7 +366,7 @@ index d2fd6a6bfa7..403aad5560d 100644
static void create_stub_exports_data( DLLSPEC *spec )
{
int i;
@@ -1184,7 +1378,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
@@ -1200,7 +1394,10 @@ static void output_fake_module_pass( DLLSPEC *spec )
if (needs_stub_exports( spec ))
{
put_label( "text_start" );
@@ -379,5 +379,5 @@ index d2fd6a6bfa7..403aad5560d 100644
}
else
--
2.20.1
1.9.1