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
e755ea23
Commit
e755ea23
authored
May 16, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Support Windows-style name mangling for fastcall functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45d19902
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
13 deletions
+23
-13
parser.c
tools/winebuild/parser.c
+0
-7
spec32.c
tools/winebuild/spec32.c
+3
-0
utils.c
tools/winebuild/utils.c
+20
-6
No files found.
tools/winebuild/parser.c
View file @
e755ea23
...
...
@@ -374,13 +374,6 @@ static int parse_spec_export( ORDDEF *odp, DLLSPEC *spec )
odp
->
flags
|=
FLAG_FORWARD
;
}
}
if
((
odp
->
flags
&
(
FLAG_THISCALL
|
FLAG_FASTCALL
))
&&
!
(
odp
->
flags
&
FLAG_FORWARD
))
{
char
*
link_name
=
strmake
(
"__%s_%s"
,
(
odp
->
flags
&
FLAG_THISCALL
)
?
"thiscall"
:
"fastcall"
,
odp
->
link_name
);
free
(
odp
->
link_name
);
odp
->
link_name
=
link_name
;
}
return
1
;
}
...
...
tools/winebuild/spec32.c
View file @
e755ea23
...
...
@@ -970,6 +970,9 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
if
(
!
is_private
)
total
++
;
if
(
!
include_stubs
&&
odp
->
type
==
TYPE_STUB
)
continue
;
if
((
odp
->
flags
&
FLAG_FASTCALL
)
&&
target_platform
==
PLATFORM_WINDOWS
)
name
=
strmake
(
"@%s"
,
name
);
output
(
" %s"
,
name
);
switch
(
odp
->
type
)
...
...
tools/winebuild/utils.c
View file @
e755ea23
...
...
@@ -893,15 +893,28 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec )
const
char
*
get_link_name
(
const
ORDDEF
*
odp
)
{
static
char
*
buffer
;
char
*
ret
;
if
(
!
kill_at
&&
target_platform
==
PLATFORM_WINDOWS
&&
target_cpu
==
CPU_x86
&&
odp
->
type
==
TYPE_STDCALL
&&
!
(
odp
->
flags
&
FLAG_THISCALL
))
if
(
target_cpu
!=
CPU_x86
)
return
odp
->
link_name
;
if
(
odp
->
type
!=
TYPE_STDCALL
)
return
odp
->
link_name
;
if
(
target_platform
==
PLATFORM_WINDOWS
)
{
free
(
buffer
);
buffer
=
strmake
(
"%s@%u"
,
odp
->
link_name
,
get_args_size
(
odp
));
return
buffer
;
if
(
odp
->
flags
&
FLAG_THISCALL
)
ret
=
strmake
(
"__thiscall_%s"
,
odp
->
link_name
);
else
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"@%s@%u"
,
odp
->
link_name
,
get_args_size
(
odp
));
else
if
(
!
kill_at
)
ret
=
strmake
(
"%s@%u"
,
odp
->
link_name
,
get_args_size
(
odp
));
else
return
odp
->
link_name
;
}
return
odp
->
link_name
;
else
{
if
(
odp
->
flags
&
FLAG_THISCALL
)
ret
=
strmake
(
"__thiscall_%s"
,
odp
->
link_name
);
else
if
(
odp
->
flags
&
FLAG_FASTCALL
)
ret
=
strmake
(
"__fastcall_%s"
,
odp
->
link_name
);
else
return
odp
->
link_name
;
}
free
(
buffer
);
buffer
=
ret
;
return
ret
;
}
/* parse a cpu name and return the corresponding value */
...
...
@@ -1036,6 +1049,7 @@ const char *asm_name( const char *sym )
{
case
PLATFORM_WINDOWS
:
if
(
target_cpu
!=
CPU_x86
)
return
sym
;
if
(
sym
[
0
]
==
'@'
)
return
sym
;
/* fastcall */
/* fall through */
case
PLATFORM_APPLE
:
if
(
sym
[
0
]
==
'.'
&&
sym
[
1
]
==
'L'
)
return
sym
;
...
...
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