Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9fd46479
Commit
9fd46479
authored
Jul 26, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Disallow register functions in 32-bit modules.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca20bdde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
parser.c
tools/winebuild/parser.c
+12
-0
spec32.c
tools/winebuild/spec32.c
+6
-18
No files found.
tools/winebuild/parser.c
View file @
9fd46479
...
...
@@ -498,6 +498,18 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp )
error
(
"Unknown flag '%s'
\n
"
,
token
);
return
NULL
;
}
switch
(
1
<<
i
)
{
case
FLAG_RET16
:
case
FLAG_REGISTER
:
if
(
spec
->
type
==
SPEC_WIN32
)
error
(
"Flag '%s' is not supported in Win32
\n
"
,
FlagNames
[
i
]
);
break
;
case
FLAG_RET64
:
if
(
spec
->
type
==
SPEC_WIN16
)
error
(
"Flag '%s' is not supported in Win16
\n
"
,
FlagNames
[
i
]
);
break
;
}
odp
->
flags
|=
1
<<
i
;
}
token
=
GetToken
(
0
);
...
...
tools/winebuild/spec32.c
View file @
9fd46479
...
...
@@ -68,8 +68,6 @@ static inline int needs_relay( const ORDDEF *odp )
}
/* skip norelay and forward entry points */
if
(
odp
->
flags
&
(
FLAG_NORELAY
|
FLAG_FORWARD
))
return
0
;
/* skip register entry points on x86_64 */
if
(
target_cpu
==
CPU_x86_64
&&
(
odp
->
flags
&
FLAG_REGISTER
))
return
0
;
return
1
;
}
...
...
@@ -179,10 +177,7 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
pushl %%eax
\n
"
);
flags
|=
2
;
}
if
(
odp
->
flags
&
FLAG_REGISTER
)
output
(
"
\t
pushl %%eax
\n
"
);
else
output
(
"
\t
pushl %%esp
\n
"
);
output
(
"
\t
pushl %%esp
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
if
(
odp
->
flags
&
FLAG_RET64
)
flags
|=
1
;
...
...
@@ -199,19 +194,12 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
pushl %%eax
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
if
(
odp
->
flags
&
FLAG_REGISTER
)
{
output
(
"
\t
call *8(%%eax)
\n
"
);
}
output
(
"
\t
call *4(%%eax)
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset -12"
);
if
(
odp
->
type
==
TYPE_STDCALL
||
odp
->
type
==
TYPE_THISCALL
)
output
(
"
\t
ret $%u
\n
"
,
args
*
get_ptr_size
()
);
else
{
output
(
"
\t
call *4(%%eax)
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset -12"
);
if
(
odp
->
type
==
TYPE_STDCALL
||
odp
->
type
==
TYPE_THISCALL
)
output
(
"
\t
ret $%u
\n
"
,
args
*
get_ptr_size
()
);
else
output
(
"
\t
ret
\n
"
);
}
output
(
"
\t
ret
\n
"
);
break
;
case
CPU_ARM
:
...
...
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