Alexandre Julliard : winebuild: List stubs in the import library .def files.
Alexandre Julliard
julliard at winehq.org
Wed Mar 20 17:09:12 CDT 2019
Module: wine
Branch: master
Commit: 32b365c9c532cff7c4db03fd347434b57a23dcf6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=32b365c9c532cff7c4db03fd347434b57a23dcf6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Mar 20 12:33:14 2019 +0100
winebuild: List stubs in the import library .def files.
This way we have the full list of names to compute ordinal hints.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/build.h | 2 +-
tools/winebuild/spec32.c | 16 +++++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index e9ef52b..49473c7 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -308,7 +308,7 @@ extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva );
extern void output_spec32_file( DLLSPEC *spec );
extern void output_pe_module( DLLSPEC *spec );
extern void output_fake_module( DLLSPEC *spec );
-extern void output_def_file( DLLSPEC *spec, int include_private );
+extern void output_def_file( DLLSPEC *spec, int include_stubs );
extern void load_res16_file( const char *name, DLLSPEC *spec );
extern void output_res16_data( DLLSPEC *spec );
extern void output_bin_res16_data( DLLSPEC *spec );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index b4512f6..04af291 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -934,7 +934,7 @@ void output_fake_module( DLLSPEC *spec )
*
* Build a Win32 def file from a spec file.
*/
-void output_def_file( DLLSPEC *spec, int include_private )
+void output_def_file( DLLSPEC *spec, int include_stubs )
{
DLLSPEC *spec32 = NULL;
const char *name;
@@ -961,16 +961,14 @@ void output_def_file( DLLSPEC *spec, int include_private )
for (i = total = 0; i < spec->nb_entry_points; i++)
{
const ORDDEF *odp = &spec->entry_points[i];
- int is_data = 0;
+ int is_data = 0, is_private = odp->flags & FLAG_PRIVATE;
if (odp->name) name = odp->name;
else if (odp->export_name) name = odp->export_name;
else continue;
- if (!(odp->flags & FLAG_PRIVATE)) total++;
- else if (!include_private) continue;
-
- if (odp->type == TYPE_STUB) continue;
+ if (!is_private) total++;
+ if (!include_stubs && odp->type == TYPE_STUB) continue;
output( " %s", name );
@@ -995,13 +993,17 @@ void output_def_file( DLLSPEC *spec, int include_private )
output( "=%s", get_link_name( odp ));
break;
}
+ case TYPE_STUB:
+ if (!kill_at && target_cpu == CPU_x86) output( "@%d", get_args_size( odp ));
+ is_private = 1;
+ break;
default:
assert(0);
}
output( " @%d", odp->ordinal );
if (!odp->name || (odp->flags & FLAG_ORDINAL)) output( " NONAME" );
if (is_data) output( " DATA" );
- if (odp->flags & FLAG_PRIVATE) output( " PRIVATE" );
+ if (is_private) output( " PRIVATE" );
output( "\n" );
}
if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name );
More information about the wine-cvs
mailing list