Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6ddd6e83
Commit
6ddd6e83
authored
Dec 08, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Support the Android Java %fs register being a GDT selector.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bf8293e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
loader.c
dlls/ntdll/unix/loader.c
+1
-0
device.c
dlls/wineandroid.drv/device.c
+3
-1
init.c
dlls/wineandroid.drv/init.c
+2
-0
No files found.
dlls/ntdll/unix/loader.c
View file @
6ddd6e83
...
...
@@ -1671,6 +1671,7 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo
{
unsigned
short
java_fs
;
__asm__
(
"mov %%fs,%0"
:
"=r"
(
java_fs
)
);
if
(
!
(
java_fs
&
4
))
java_gdt_sel
=
java_fs
;
__asm__
(
"mov %0,%%fs"
::
"r"
(
0
)
);
start_main_thread
();
__asm__
(
"mov %0,%%fs"
::
"r"
(
java_fs
)
);
...
...
dlls/wineandroid.drv/device.c
View file @
6ddd6e83
...
...
@@ -258,9 +258,11 @@ static inline void wrap_java_call(void) { __asm__( "mov %0,%%fs" :: "r" (java_
static
inline
void
unwrap_java_call
(
void
)
{
__asm__
(
"mov %0,%%fs"
::
"r"
(
orig_fs
)
);
}
static
inline
void
init_java_thread
(
JavaVM
*
java_vm
)
{
java_fs
=
*
p_java_gdt_sel
;
__asm__
(
"mov %%fs,%0"
:
"=r"
(
orig_fs
)
);
__asm__
(
"mov %0,%%fs"
::
"r"
(
java_fs
)
);
(
*
java_vm
)
->
AttachCurrentThread
(
java_vm
,
&
jni_env
,
0
);
__asm__
(
"mov %%fs,%0"
:
"=r"
(
java_fs
)
);
if
(
!*
p_java_gdt_sel
)
__asm__
(
"mov %%fs,%0"
:
"=r"
(
java_fs
)
);
__asm__
(
"mov %0,%%fs"
::
"r"
(
orig_fs
)
);
}
...
...
dlls/wineandroid.drv/init.c
View file @
6ddd6e83
...
...
@@ -622,6 +622,7 @@ static void load_android_libs(void)
JavaVM
**
p_java_vm
=
NULL
;
jobject
*
p_java_object
=
NULL
;
unsigned
short
*
p_java_gdt_sel
=
NULL
;
static
BOOL
process_attach
(
void
)
{
...
...
@@ -635,6 +636,7 @@ static BOOL process_attach(void)
p_java_vm
=
dlsym
(
ntdll
,
"java_vm"
);
p_java_object
=
dlsym
(
ntdll
,
"java_object"
);
p_java_gdt_sel
=
dlsym
(
ntdll
,
"java_gdt_sel"
);
object
=
*
p_java_object
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment