Commit ded2e82f authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 7ac6cdfa
...@@ -306,7 +306,6 @@ extern int load_res32_file( const char *name, DLLSPEC *spec ); ...@@ -306,7 +306,6 @@ extern int load_res32_file( const char *name, DLLSPEC *spec );
extern void output_resources( DLLSPEC *spec ); extern void output_resources( DLLSPEC *spec );
extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ); extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva );
extern void output_spec32_file( DLLSPEC *spec ); extern void output_spec32_file( DLLSPEC *spec );
extern void output_pe_module( DLLSPEC *spec );
extern void output_fake_module( DLLSPEC *spec ); extern void output_fake_module( DLLSPEC *spec );
extern void output_def_file( DLLSPEC *spec, int include_stubs ); extern void output_def_file( DLLSPEC *spec, int include_stubs );
extern void load_res16_file( const char *name, DLLSPEC *spec ); extern void load_res16_file( const char *name, DLLSPEC *spec );
......
...@@ -1311,6 +1311,7 @@ void output_stubs( DLLSPEC *spec ) ...@@ -1311,6 +1311,7 @@ void output_stubs( DLLSPEC *spec )
/* output the import and delayed import tables of a Win32 module */ /* output the import and delayed import tables of a Win32 module */
void output_imports( DLLSPEC *spec ) void output_imports( DLLSPEC *spec )
{ {
if (target_platform == PLATFORM_WINDOWS) return;
output_immediate_imports(); output_immediate_imports();
output_delayed_imports( spec ); output_delayed_imports( spec );
output_immediate_import_thunks(); output_immediate_import_thunks();
......
...@@ -630,26 +630,22 @@ int main(int argc, char **argv) ...@@ -630,26 +630,22 @@ int main(int argc, char **argv)
/* fall through */ /* fall through */
case MODE_EXE: case MODE_EXE:
load_resources( argv, spec ); load_resources( argv, spec );
load_import_libs( argv );
if (spec_file_name && !parse_input_file( spec )) break; if (spec_file_name && !parse_input_file( spec )) break;
if (fake_module) if (fake_module)
{ {
if (spec->type == SPEC_WIN16) output_fake_module16( spec ); if (spec->type == SPEC_WIN16) output_fake_module16( spec );
else output_fake_module( spec ); else output_fake_module( spec );
break; break;
} }
read_undef_symbols( spec, argv ); if (target_platform != PLATFORM_WINDOWS)
switch (spec->type)
{ {
case SPEC_WIN16: load_import_libs( argv );
output_spec16_file( spec ); read_undef_symbols( spec, argv );
break; resolve_imports( spec );
case SPEC_WIN32:
if (target_platform == PLATFORM_WINDOWS) output_pe_module( spec );
else output_spec32_file( spec );
break;
default: assert(0);
} }
if (spec->type == SPEC_WIN16) output_spec16_file( spec );
else output_spec32_file( spec );
break; break;
case MODE_DEF: case MODE_DEF:
if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );
......
...@@ -815,17 +815,16 @@ void output_spec16_file( DLLSPEC *spec16 ) ...@@ -815,17 +815,16 @@ void output_spec16_file( DLLSPEC *spec16 )
{ {
DLLSPEC *spec32 = alloc_dll_spec(); DLLSPEC *spec32 = alloc_dll_spec();
resolve_imports( spec16 );
add_16bit_exports( spec32, spec16 ); add_16bit_exports( spec32, spec16 );
needs_get_pc_thunk = 0; needs_get_pc_thunk = 0;
open_output_file(); open_output_file();
output_standard_file_header(); output_standard_file_header();
if (target_platform != PLATFORM_WINDOWS) output_module( spec32 ); output_module( spec32 );
output_module16( spec16 ); output_module16( spec16 );
output_stubs( spec16 ); output_stubs( spec16 );
output_exports( spec32 ); 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 (is_undefined( "__wine_call_from_16" )) output_asm_relays16();
if (needs_get_pc_thunk) output_get_pc_thunk(); if (needs_get_pc_thunk) output_get_pc_thunk();
if (spec16->main_module) if (spec16->main_module)
......
...@@ -584,6 +584,8 @@ void output_module( DLLSPEC *spec ) ...@@ -584,6 +584,8 @@ void output_module( DLLSPEC *spec )
switch (target_platform) switch (target_platform)
{ {
case PLATFORM_WINDOWS:
return; /* nothing to do */
case PLATFORM_APPLE: case PLATFORM_APPLE:
output( "\t.text\n" ); output( "\t.text\n" );
output( "\t.align %d\n", get_alignment(page_size) ); output( "\t.align %d\n", get_alignment(page_size) );
...@@ -710,7 +712,6 @@ void output_module( DLLSPEC *spec ) ...@@ -710,7 +712,6 @@ void output_module( DLLSPEC *spec )
void output_spec32_file( DLLSPEC *spec ) void output_spec32_file( DLLSPEC *spec )
{ {
needs_get_pc_thunk = 0; needs_get_pc_thunk = 0;
resolve_imports( spec );
open_output_file(); open_output_file();
output_standard_file_header(); output_standard_file_header();
output_module( spec ); output_module( spec );
...@@ -725,24 +726,6 @@ void output_spec32_file( DLLSPEC *spec ) ...@@ -725,24 +726,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 * output_fake_module
* *
* Build a fake binary module from a spec file. * Build a fake binary module from a spec file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment