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
ef9bda4c
Commit
ef9bda4c
authored
Mar 06, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add a helper for decorating stdcall function names.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3229faf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
build.h
tools/winebuild/build.h
+1
-0
import.c
tools/winebuild/import.c
+1
-1
spec32.c
tools/winebuild/spec32.c
+2
-8
utils.c
tools/winebuild/utils.c
+15
-0
No files found.
tools/winebuild/build.h
View file @
ef9bda4c
...
@@ -268,6 +268,7 @@ extern DLLSPEC *alloc_dll_spec(void);
...
@@ -268,6 +268,7 @@ extern DLLSPEC *alloc_dll_spec(void);
extern
void
free_dll_spec
(
DLLSPEC
*
spec
);
extern
void
free_dll_spec
(
DLLSPEC
*
spec
);
extern
char
*
make_c_identifier
(
const
char
*
str
);
extern
char
*
make_c_identifier
(
const
char
*
str
);
extern
const
char
*
get_stub_name
(
const
ORDDEF
*
odp
,
const
DLLSPEC
*
spec
);
extern
const
char
*
get_stub_name
(
const
ORDDEF
*
odp
,
const
DLLSPEC
*
spec
);
extern
const
char
*
get_link_name
(
const
ORDDEF
*
odp
);
extern
int
get_cpu_from_name
(
const
char
*
name
);
extern
int
get_cpu_from_name
(
const
char
*
name
);
extern
unsigned
int
get_alignment
(
unsigned
int
align
);
extern
unsigned
int
get_alignment
(
unsigned
int
align
);
extern
unsigned
int
get_page_size
(
void
);
extern
unsigned
int
get_page_size
(
void
);
...
...
tools/winebuild/import.c
View file @
ef9bda4c
...
@@ -498,7 +498,7 @@ static char *create_undef_symbols_file( DLLSPEC *spec )
...
@@ -498,7 +498,7 @@ static char *create_undef_symbols_file( DLLSPEC *spec )
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
ORDDEF
*
odp
=
&
spec
->
entry_points
[
i
];
if
(
odp
->
type
==
TYPE_STUB
||
odp
->
type
==
TYPE_ABS
||
odp
->
type
==
TYPE_VARIABLE
)
continue
;
if
(
odp
->
type
==
TYPE_STUB
||
odp
->
type
==
TYPE_ABS
||
odp
->
type
==
TYPE_VARIABLE
)
continue
;
if
(
odp
->
flags
&
FLAG_FORWARD
)
continue
;
if
(
odp
->
flags
&
FLAG_FORWARD
)
continue
;
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
odp
->
link_name
)
);
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
get_link_name
(
odp
))
);
}
}
for
(
j
=
0
;
j
<
extra_ld_symbols
.
count
;
j
++
)
for
(
j
=
0
;
j
<
extra_ld_symbols
.
count
;
j
++
)
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
extra_ld_symbols
.
str
[
j
])
);
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
extra_ld_symbols
.
str
[
j
])
);
...
...
tools/winebuild/spec32.c
View file @
ef9bda4c
...
@@ -419,7 +419,7 @@ void output_exports( DLLSPEC *spec )
...
@@ -419,7 +419,7 @@ void output_exports( DLLSPEC *spec )
}
}
else
else
{
{
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
odp
->
link_name
)
);
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
get_link_name
(
odp
))
);
}
}
break
;
break
;
case
TYPE_STUB
:
case
TYPE_STUB
:
...
@@ -977,15 +977,9 @@ void output_def_file( DLLSPEC *spec, int include_private )
...
@@ -977,15 +977,9 @@ void output_def_file( DLLSPEC *spec, int include_private )
int
at_param
=
get_args_size
(
odp
);
int
at_param
=
get_args_size
(
odp
);
if
(
!
kill_at
&&
target_cpu
==
CPU_x86
)
output
(
"@%d"
,
at_param
);
if
(
!
kill_at
&&
target_cpu
==
CPU_x86
)
output
(
"@%d"
,
at_param
);
if
(
odp
->
flags
&
FLAG_FORWARD
)
if
(
odp
->
flags
&
FLAG_FORWARD
)
{
output
(
"=%s"
,
odp
->
link_name
);
output
(
"=%s"
,
odp
->
link_name
);
}
else
if
(
strcmp
(
name
,
odp
->
link_name
))
/* try to reduce output */
else
if
(
strcmp
(
name
,
odp
->
link_name
))
/* try to reduce output */
{
output
(
"=%s"
,
get_link_name
(
odp
));
output
(
"=%s"
,
odp
->
link_name
);
if
(
!
kill_at
&&
target_cpu
==
CPU_x86
&&
!
(
odp
->
flags
&
FLAG_THISCALL
))
output
(
"@%d"
,
at_param
);
}
break
;
break
;
}
}
default:
default:
...
...
tools/winebuild/utils.c
View file @
ef9bda4c
...
@@ -894,6 +894,21 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec )
...
@@ -894,6 +894,21 @@ const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec )
return
buffer
;
return
buffer
;
}
}
/* return the stdcall-decorated name for an entry point */
const
char
*
get_link_name
(
const
ORDDEF
*
odp
)
{
static
char
*
buffer
;
if
(
!
kill_at
&&
target_platform
==
PLATFORM_WINDOWS
&&
target_cpu
==
CPU_x86
&&
odp
->
type
==
TYPE_STDCALL
&&
!
(
odp
->
flags
&
FLAG_THISCALL
))
{
free
(
buffer
);
buffer
=
strmake
(
"%s@%u"
,
odp
->
link_name
,
get_args_size
(
odp
));
return
buffer
;
}
return
odp
->
link_name
;
}
/* parse a cpu name and return the corresponding value */
/* parse a cpu name and return the corresponding value */
int
get_cpu_from_name
(
const
char
*
name
)
int
get_cpu_from_name
(
const
char
*
name
)
{
{
...
...
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