winebuild: Don't even try to resolve imports for PE builds.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-04 12:38:43 +02:00
parent 7ac6cdfa00
commit ded2e82f16
5 changed files with 12 additions and 34 deletions

View File

@ -306,7 +306,6 @@ extern int load_res32_file( const char *name, DLLSPEC *spec );
extern void output_resources( DLLSPEC *spec );
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_stubs );
extern void load_res16_file( const char *name, DLLSPEC *spec );

View File

@ -1311,6 +1311,7 @@ void output_stubs( DLLSPEC *spec )
/* output the import and delayed import tables of a Win32 module */
void output_imports( DLLSPEC *spec )
{
if (target_platform == PLATFORM_WINDOWS) return;
output_immediate_imports();
output_delayed_imports( spec );
output_immediate_import_thunks();

View File

@ -630,26 +630,22 @@ int main(int argc, char **argv)
/* fall through */
case MODE_EXE:
load_resources( argv, spec );
load_import_libs( argv );
if (spec_file_name && !parse_input_file( spec )) break;
if (fake_module)
{
if (spec->type == SPEC_WIN16) output_fake_module16( spec );
else output_fake_module( spec );
break;
}
read_undef_symbols( spec, argv );
switch (spec->type)
if (target_platform != PLATFORM_WINDOWS)
{
case SPEC_WIN16:
output_spec16_file( spec );
break;
case SPEC_WIN32:
if (target_platform == PLATFORM_WINDOWS) output_pe_module( spec );
else output_spec32_file( spec );
break;
default: assert(0);
load_import_libs( argv );
read_undef_symbols( spec, argv );
resolve_imports( spec );
}
if (spec->type == SPEC_WIN16) output_spec16_file( spec );
else output_spec32_file( spec );
break;
case MODE_DEF:
if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );

View File

@ -815,17 +815,16 @@ void output_spec16_file( DLLSPEC *spec16 )
{
DLLSPEC *spec32 = alloc_dll_spec();
resolve_imports( spec16 );
add_16bit_exports( spec32, spec16 );
needs_get_pc_thunk = 0;
open_output_file();
output_standard_file_header();
if (target_platform != PLATFORM_WINDOWS) output_module( spec32 );
output_module( spec32 );
output_module16( spec16 );
output_stubs( spec16 );
output_exports( spec32 );
if (target_platform != PLATFORM_WINDOWS) output_imports( spec16 );
output_imports( spec16 );
if (is_undefined( "__wine_call_from_16" )) output_asm_relays16();
if (needs_get_pc_thunk) output_get_pc_thunk();
if (spec16->main_module)

View File

@ -584,6 +584,8 @@ void output_module( DLLSPEC *spec )
switch (target_platform)
{
case PLATFORM_WINDOWS:
return; /* nothing to do */
case PLATFORM_APPLE:
output( "\t.text\n" );
output( "\t.align %d\n", get_alignment(page_size) );
@ -710,7 +712,6 @@ void output_module( DLLSPEC *spec )
void output_spec32_file( DLLSPEC *spec )
{
needs_get_pc_thunk = 0;
resolve_imports( spec );
open_output_file();
output_standard_file_header();
output_module( spec );
@ -724,24 +725,6 @@ void output_spec32_file( DLLSPEC *spec )
}
/*******************************************************************
* output_pe_module
*
* Build a PE from a spec file.
*/
void output_pe_module( DLLSPEC *spec )
{
UsePIC = 0;
resolve_imports( spec );
open_output_file();
output_standard_file_header();
output_stubs( spec );
output_exports( spec );
output_resources( spec );
close_output_file();
}
/*******************************************************************
* output_fake_module
*