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
7b494f13
Commit
7b494f13
authored
May 17, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Store wine_ldt_copy pointer in the NE header at load time.
Avoids having to import libwine from 16-bit modules. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
075e561f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
ne_module.c
dlls/krnl386.exe16/ne_module.c
+1
-0
relay.c
tools/winebuild/relay.c
+3
-5
spec16.c
tools/winebuild/spec16.c
+3
-6
No files found.
dlls/krnl386.exe16/ne_module.c
View file @
7b494f13
...
...
@@ -921,6 +921,7 @@ static HMODULE16 NE_DoLoadBuiltinModule( const IMAGE_DOS_HEADER *mz_header, cons
}
patch_code_segment
(
pModule
);
*
(
void
**
)
mz_header
->
e_res2
=
&
wine_ldt_copy
;
return
hInstance
;
}
...
...
tools/winebuild/relay.c
View file @
7b494f13
...
...
@@ -156,12 +156,10 @@ static void BuildCallFrom16Core( int reg_func, int thunk )
output
(
"
\t
andl $0xfff8, %%edx
\n
"
);
output
(
"
\t
shrl $1, %%edx
\n
"
);
if
(
UsePIC
)
{
output
(
"
\t
addl wine_ldt_copy_ptr-1b(%%ecx),%%edx
\n
"
);
output
(
"
\t
movl (%%edx), %%edx
\n
"
);
}
output
(
"
\t
addl .Lwine_ldt_copy_ptr-1b(%%ecx),%%edx
\n
"
);
else
output
(
"
\t
movl %s(%%edx), %%edx
\n
"
,
asm_name
(
"wine_ldt_copy"
)
);
output
(
"
\t
addl .Lwine_ldt_copy_ptr,%%edx
\n
"
);
output
(
"
\t
movl (%%edx), %%edx
\n
"
);
output
(
"
\t
movzwl %%sp, %%ebp
\n
"
);
output
(
"
\t
leal %d(%%ebp,%%edx), %%edx
\n
"
,
reg_func
?
0
:
-
4
);
...
...
tools/winebuild/spec16.c
View file @
7b494f13
...
...
@@ -355,11 +355,11 @@ static void output_call16_function( ORDDEF *odp )
if
(
UsePIC
)
{
output
(
"
\t
call %s
\n
"
,
asm_name
(
"__wine_spec_get_pc_thunk_eax"
)
);
output
(
"1:
\t
movl wine_ldt_copy_ptr-1b(%%eax),%%esi
\n
"
);
output
(
"1:
\t
movl
.L
wine_ldt_copy_ptr-1b(%%eax),%%esi
\n
"
);
needs_get_pc_thunk
=
1
;
}
else
output
(
"
\t
movl
$%s,%%esi
\n
"
,
asm_name
(
"wine_ldt_copy"
)
);
output
(
"
\t
movl
.Lwine_ldt_copy_ptr,%%esi
\n
"
);
}
/* preserve 16-byte stack alignment */
...
...
@@ -584,7 +584,7 @@ static void output_module16( DLLSPEC *spec )
output
(
"
\t
.short 0,0,0,0
\n
"
);
/* e_res */
output
(
"
\t
.short 0
\n
"
);
/* e_oemid */
output
(
"
\t
.short 0
\n
"
);
/* e_oeminfo */
output
(
"
\t
.short 0,0,0,0,0,0,0,0,0,0
\n
"
);
/* e_res2
*/
output
(
"
.Lwine_ldt_copy_ptr:
\t
.long 0,0,0,0,0
\n
"
);
/* e_res2, used for ldt_copy
*/
output
(
"
\t
.long .L__wine_spec_ne_header-.L__wine_spec_dos_header
\n
"
);
/* e_lfanew */
output
(
".L__wine_spec_ne_header:
\n
"
);
...
...
@@ -794,9 +794,6 @@ static void output_module16( DLLSPEC *spec )
output
(
"
\n
/* relay functions */
\n\n
"
);
output
(
"
\t
.text
\n
"
);
for
(
i
=
0
;
i
<
nb_funcs
;
i
++
)
output_call16_function
(
typelist
[
i
]
);
output
(
"
\t
.data
\n
"
);
output
(
"wine_ldt_copy_ptr:
\n
"
);
output
(
"
\t
.long %s
\n
"
,
asm_name
(
"wine_ldt_copy"
)
);
}
free
(
typelist
);
...
...
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