winebuild: Only generate a constructor for dll modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2ba1b7fd3b
commit
a4677fa23a
|
@ -386,7 +386,7 @@ static void set_exec_mode( enum exec_mode_values mode )
|
||||||
static const char *get_default_entry_point( const DLLSPEC *spec )
|
static const char *get_default_entry_point( const DLLSPEC *spec )
|
||||||
{
|
{
|
||||||
if (spec->characteristics & IMAGE_FILE_DLL) return "__wine_spec_dll_entry";
|
if (spec->characteristics & IMAGE_FILE_DLL) return "__wine_spec_dll_entry";
|
||||||
if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "__wine_spec_drv_entry";
|
if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "DriverEntry";
|
||||||
if (spec->type == SPEC_WIN16) return "__wine_spec_exe16_entry";
|
if (spec->type == SPEC_WIN16) return "__wine_spec_exe16_entry";
|
||||||
return "__wine_spec_exe_entry";
|
return "__wine_spec_exe_entry";
|
||||||
}
|
}
|
||||||
|
|
|
@ -680,7 +680,8 @@ void output_module( DLLSPEC *spec )
|
||||||
|
|
||||||
output( "\n\t.data\n" );
|
output( "\n\t.data\n" );
|
||||||
output( "\t.align %d\n", get_alignment(get_ptr_size()) );
|
output( "\t.align %d\n", get_alignment(get_ptr_size()) );
|
||||||
output( "%s\n", asm_globl("__wine_spec_nt_header") );
|
output( "\t.globl %s\n", asm_name("__wine_spec_nt_header") );
|
||||||
|
output( "%s:\n", asm_name("__wine_spec_nt_header") );
|
||||||
output( ".L__wine_spec_rva_base:\n" );
|
output( ".L__wine_spec_rva_base:\n" );
|
||||||
|
|
||||||
output( "\t.long 0x4550\n" ); /* Signature */
|
output( "\t.long 0x4550\n" ); /* Signature */
|
||||||
|
@ -749,13 +750,16 @@ void output_module( DLLSPEC *spec )
|
||||||
|
|
||||||
output_data_directories( data_dirs );
|
output_data_directories( data_dirs );
|
||||||
|
|
||||||
output( "\n\t%s\n", get_asm_string_section() );
|
if (spec->characteristics & IMAGE_FILE_DLL)
|
||||||
output( "%s\n", asm_globl("__wine_spec_file_name") );
|
{
|
||||||
output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name );
|
output( "\n\t%s\n", get_asm_string_section() );
|
||||||
|
output( "%s\n", asm_globl("__wine_spec_file_name") );
|
||||||
|
output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name );
|
||||||
|
output_asm_constructor( "__wine_spec_init_ctor" );
|
||||||
|
}
|
||||||
|
|
||||||
if (target_platform == PLATFORM_APPLE)
|
if (target_platform == PLATFORM_APPLE)
|
||||||
output( "\t.lcomm %s,4\n", asm_name("_end") );
|
output( "\t.lcomm %s,4\n", asm_name("_end") );
|
||||||
|
|
||||||
output_asm_constructor( "__wine_spec_init_ctor" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue