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
a06d60bd
Commit
a06d60bd
authored
Feb 19, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Factor out output_syscall_dispatcher.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a0a62463
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
19 deletions
+27
-19
import.c
tools/winebuild/import.c
+27
-19
No files found.
tools/winebuild/import.c
View file @
a06d60bd
...
...
@@ -1425,28 +1425,11 @@ static int cmp_link_name( const void *e1, const void *e2 )
}
/* output
the functions
for system calls */
void
output_syscalls
(
DLLSPEC
*
spec
)
/* output
dispatcher
for system calls */
static
void
output_syscall_dispatcher
(
int
count
)
{
const
unsigned
int
invalid_param
=
0xc000000d
;
/* STATUS_INVALID_PARAMETER */
int
i
,
count
;
ORDDEF
**
syscalls
=
NULL
;
for
(
i
=
count
=
0
;
i
<
spec
->
nb_entry_points
;
i
++
)
{
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
if
(
!
(
odp
->
flags
&
FLAG_SYSCALL
))
continue
;
if
(
!
syscalls
)
syscalls
=
xmalloc
(
(
spec
->
nb_entry_points
-
i
)
*
sizeof
(
*
syscalls
)
);
syscalls
[
count
++
]
=
odp
;
}
if
(
!
count
)
return
;
count
=
sort_func_list
(
syscalls
,
count
,
cmp_link_name
);
output
(
"
\n
/* system calls */
\n\n
"
);
output
(
"
\t
.text
\n
"
);
if
(
unix_lib
)
{
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
"
\t
%s
\n
"
,
func_declaration
(
"__wine_syscall_dispatcher"
)
);
output
(
"%s
\n
"
,
asm_globl
(
"__wine_syscall_dispatcher"
)
);
...
...
@@ -1700,6 +1683,31 @@ void output_syscalls( DLLSPEC *spec )
}
output_cfi
(
".cfi_endproc"
);
output_function_size
(
"__wine_syscall_dispatcher"
);
}
/* output the functions for system calls */
void
output_syscalls
(
DLLSPEC
*
spec
)
{
int
i
,
count
;
ORDDEF
**
syscalls
=
NULL
;
for
(
i
=
count
=
0
;
i
<
spec
->
nb_entry_points
;
i
++
)
{
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
if
(
!
(
odp
->
flags
&
FLAG_SYSCALL
))
continue
;
if
(
!
syscalls
)
syscalls
=
xmalloc
(
(
spec
->
nb_entry_points
-
i
)
*
sizeof
(
*
syscalls
)
);
syscalls
[
count
++
]
=
odp
;
}
if
(
!
count
)
return
;
count
=
sort_func_list
(
syscalls
,
count
,
cmp_link_name
);
output
(
"
\n
/* system calls */
\n\n
"
);
output
(
"
\t
.text
\n
"
);
if
(
unix_lib
)
{
output_syscall_dispatcher
(
count
);
output
(
"
\t
.data
\n
"
);
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
get_ptr_size
()
)
);
...
...
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