Alexandre Julliard : preloader: Add a fallback to the old mmap syscall just in case.
Alexandre Julliard
julliard at winehq.org
Tue May 2 15:58:47 CDT 2017
Module: wine
Branch: master
Commit: 9f06a197c8c156acf21d8d809ce80cdcde9b6f68
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f06a197c8c156acf21d8d809ce80cdcde9b6f68
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 2 20:06:25 2017 +0200
preloader: Add a fallback to the old mmap syscall just in case.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
loader/preloader.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/loader/preloader.c b/loader/preloader.c
index a21efc9..5e6add7 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -311,9 +311,16 @@ __ASM_GLOBAL_FUNC(wld_mmap,
"\tshrl $12,%ebp\n"
"\tint $0x80\n"
"\tcmpl $-4096,%eax\n"
- "\tjbe 1f\n"
- "\tmovl $-1,%eax\n"
- "1:\tpopl %edi\n"
+ "\tjbe 2f\n"
+ "\tcmpl $-38,%eax\n" /* ENOSYS */
+ "\tjne 1f\n"
+ "\tmovl $90,%eax\n" /* SYS_mmap */
+ "\tleal 20(%esp),%ebx\n"
+ "\tint $0x80\n"
+ "\tcmpl $-4096,%eax\n"
+ "\tjbe 2f\n"
+ "1:\tmovl $-1,%eax\n"
+ "2:\tpopl %edi\n"
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t")
"\tpopl %esi\n"
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t")
More information about the wine-cvs
mailing list