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
a0266339
Commit
a0266339
authored
Jul 07, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add a -syscall entry point flag
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a72836c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
build.h
tools/winebuild/build.h
+4
-3
import.c
tools/winebuild/import.c
+2
-0
parser.c
tools/winebuild/parser.c
+9
-0
winebuild.man.in
tools/winebuild/winebuild.man.in
+6
-0
No files found.
tools/winebuild/build.h
View file @
a0266339
...
...
@@ -175,9 +175,10 @@ struct strarray
#define FLAG_REGISTER 0x0010
/* use register calling convention */
#define FLAG_PRIVATE 0x0020
/* function is private (cannot be imported) */
#define FLAG_ORDINAL 0x0040
/* function should be imported by ordinal */
#define FLAG_THISCALL 0x0080
/* use thiscall calling convention */
#define FLAG_FASTCALL 0x0100
/* use fastcall calling convention */
#define FLAG_IMPORT 0x0200
/* export is imported from another module */
#define FLAG_THISCALL 0x0080
/* function uses thiscall calling convention */
#define FLAG_FASTCALL 0x0100
/* function uses fastcall calling convention */
#define FLAG_SYSCALL 0x0200
/* function is a system call */
#define FLAG_IMPORT 0x0400
/* export is imported from another module */
#define FLAG_FORWARD 0x1000
/* function is a forwarded name */
#define FLAG_EXT_LINK 0x2000
/* function links to an external symbol */
...
...
tools/winebuild/import.c
View file @
a0266339
...
...
@@ -545,6 +545,7 @@ static void check_undefined_exports( DLLSPEC *spec )
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
if
(
odp
->
type
==
TYPE_STUB
||
odp
->
type
==
TYPE_ABS
||
odp
->
type
==
TYPE_VARIABLE
)
continue
;
if
(
odp
->
flags
&
FLAG_FORWARD
)
continue
;
if
(
odp
->
flags
&
FLAG_SYSCALL
)
continue
;
if
(
find_name
(
odp
->
link_name
,
&
undef_symbols
))
{
switch
(
odp
->
type
)
...
...
@@ -587,6 +588,7 @@ static char *create_undef_symbols_file( DLLSPEC *spec )
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
if
(
odp
->
type
==
TYPE_STUB
||
odp
->
type
==
TYPE_ABS
||
odp
->
type
==
TYPE_VARIABLE
)
continue
;
if
(
odp
->
flags
&
FLAG_FORWARD
)
continue
;
if
(
odp
->
flags
&
FLAG_SYSCALL
)
continue
;
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
get_link_name
(
odp
)));
}
for
(
j
=
0
;
j
<
extra_ld_symbols
.
count
;
j
++
)
...
...
tools/winebuild/parser.c
View file @
a0266339
...
...
@@ -70,6 +70,7 @@ static const char * const FlagNames[] =
"ordinal"
,
/* FLAG_ORDINAL */
"thiscall"
,
/* FLAG_THISCALL */
"fastcall"
,
/* FLAG_FASTCALL */
"syscall"
,
/* FLAG_SYCALL */
"import"
,
/* FLAG_IMPORT */
NULL
};
...
...
@@ -320,6 +321,14 @@ static int parse_spec_arguments( ORDDEF *odp, DLLSPEC *spec, int optional )
return
0
;
}
}
if
(
odp
->
flags
&
FLAG_SYSCALL
)
{
if
(
odp
->
type
!=
TYPE_STDCALL
)
{
error
(
"A syscall function must use the stdcall convention
\n
"
);
return
0
;
}
}
return
1
;
}
...
...
tools/winebuild/winebuild.man.in
View file @
a0266339
...
...
@@ -338,6 +338,12 @@ The function uses the
calling convention (first two parameters in %ecx/%edx registers on
i386).
.TP
.B -syscall
The function is an NT system call. A system call thunk will be
generated, and the actual function will be called by the
\fI__wine_syscall_dispatcher\fR function that will be generated on the
Unix library side.
.TP
.B -import
The function is imported from another module. This can be used instead
of a
...
...
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