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 f712a98d12d091c5437159a291857dfb9f0cea7c.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
From 5199e9b66777ab4436b8d641dd8412da472d718d Mon Sep 17 00:00:00 2001
|
||||
From 54b37227849cb6e4d214b4a6740d37624e4bb037 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 14 Jul 2020 15:00:34 +0300
|
||||
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/ntdll/unix/signal_x86_64.c | 122 ++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/signal_x86_64.c | 123 ++++++++++++++++++++++++++++++++
|
||||
tools/winebuild/import.c | 3 +-
|
||||
3 files changed, 124 insertions(+), 2 deletions(-)
|
||||
3 files changed, 125 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 594794ed93c..38f6e76eae0 100644
|
||||
index 9af23da03e6..058fea5941d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -479,6 +479,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -455,6 +455,7 @@ AC_CHECK_HEADERS(\
|
||||
linux/joystick.h \
|
||||
linux/major.h \
|
||||
linux/param.h \
|
||||
@@ -22,18 +22,24 @@ index 594794ed93c..38f6e76eae0 100644
|
||||
linux/types.h \
|
||||
linux/ucdrom.h \
|
||||
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
|
||||
index a9bdbf62929..7d9ee03ffaf 100644
|
||||
index 4600d079536..f028a855147 100644
|
||||
--- a/dlls/ntdll/unix/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/unix/signal_x86_64.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "wine/port.h"
|
||||
@@ -27,11 +27,13 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
+#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@@ -68,6 +69,13 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
+#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
@@ -65,6 +67,13 @@
|
||||
# include <mach/mach.h>
|
||||
#endif
|
||||
|
||||
@@ -47,7 +53,7 @@ index a9bdbf62929..7d9ee03ffaf 100644
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
#include "ntstatus.h"
|
||||
@@ -2426,6 +2434,118 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
@@ -2422,6 +2431,118 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -166,7 +172,7 @@ index a9bdbf62929..7d9ee03ffaf 100644
|
||||
|
||||
/***********************************************************************
|
||||
* handle_interrupt
|
||||
@@ -2980,6 +3100,7 @@ void signal_init_process(void)
|
||||
@@ -3000,6 +3121,7 @@ void signal_init_process(void)
|
||||
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
|
||||
@@ -174,7 +180,7 @@ index a9bdbf62929..7d9ee03ffaf 100644
|
||||
return;
|
||||
|
||||
error:
|
||||
@@ -3175,6 +3296,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
|
||||
@@ -3218,6 +3340,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
|
||||
"leaq 0x28(%rsp),%rsi\n\t" /* first argument */
|
||||
"movq %rcx,%rsp\n\t"
|
||||
"movq 0x00(%rcx),%rax\n\t"
|
||||
@@ -183,10 +189,10 @@ index a9bdbf62929..7d9ee03ffaf 100644
|
||||
"movl %eax,%ebx\n\t"
|
||||
"shrl $8,%ebx\n\t"
|
||||
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
|
||||
index fcd27117780..0da028d83e7 100644
|
||||
index 104397716f1..5f62210f486 100644
|
||||
--- a/tools/winebuild/import.c
|
||||
+++ b/tools/winebuild/import.c
|
||||
@@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 )
|
||||
@@ -1410,7 +1410,6 @@ static int cmp_link_name( const void *e1, const void *e2 )
|
||||
return strcmp( odp1->link_name, odp2->link_name );
|
||||
}
|
||||
|
||||
@@ -194,7 +200,7 @@ index fcd27117780..0da028d83e7 100644
|
||||
/* output the functions for system calls */
|
||||
void output_syscalls( DLLSPEC *spec )
|
||||
{
|
||||
@@ -1477,7 +1476,7 @@ void output_syscalls( DLLSPEC *spec )
|
||||
@@ -1468,7 +1467,7 @@ void output_syscalls( DLLSPEC *spec )
|
||||
* validate that instruction, we can just put a jmp there instead. */
|
||||
output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */
|
||||
output( "\t.byte 0xb8\n" ); /* movl $i,%eax */
|
||||
|
Reference in New Issue
Block a user