winebuild: Don't use a constructor for dll modules either.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3872dc55ef
commit
7193243431
|
@ -389,7 +389,7 @@ static void set_exec_mode( enum exec_mode_values mode )
|
|||
/* get the default entry point for a given spec file */
|
||||
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 "DllMain";
|
||||
if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "DriverEntry";
|
||||
if (spec->type == SPEC_WIN16) return "__wine_spec_exe16_entry";
|
||||
return "__wine_spec_exe_entry";
|
||||
|
|
|
@ -829,7 +829,7 @@ void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 )
|
|||
if (spec16->characteristics & IMAGE_FILE_DLL)
|
||||
{
|
||||
spec32->characteristics = IMAGE_FILE_DLL;
|
||||
spec32->init_func = xstrdup( "__wine_spec_dll_entry" );
|
||||
spec32->init_func = xstrdup( "DllMain" );
|
||||
}
|
||||
|
||||
/* add an export for the NE module */
|
||||
|
|
|
@ -587,43 +587,6 @@ void output_exports( DLLSPEC *spec )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* output_asm_constructor
|
||||
*
|
||||
* Output code for calling a dll constructor.
|
||||
*/
|
||||
static void output_asm_constructor( const char *constructor )
|
||||
{
|
||||
if (target_platform == PLATFORM_APPLE)
|
||||
{
|
||||
/* Mach-O doesn't have an init section */
|
||||
output( "\n\t.mod_init_func\n" );
|
||||
output( "\t.align %d\n", get_alignment(get_ptr_size()) );
|
||||
output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(constructor) );
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(target_cpu)
|
||||
{
|
||||
case CPU_x86:
|
||||
case CPU_x86_64:
|
||||
output( "\n\t.section \".init\",\"ax\"\n" );
|
||||
output( "\tcall %s\n", asm_name(constructor) );
|
||||
break;
|
||||
case CPU_ARM:
|
||||
output( "\n\t.section \".text\",\"ax\"\n" );
|
||||
output( "\tblx %s\n", asm_name(constructor) );
|
||||
break;
|
||||
case CPU_ARM64:
|
||||
case CPU_POWERPC:
|
||||
output( "\n\t.section \".init\",\"ax\"\n" );
|
||||
output( "\tbl %s\n", asm_name(constructor) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* output_module
|
||||
*
|
||||
|
@ -750,14 +713,6 @@ void output_module( DLLSPEC *spec )
|
|||
|
||||
output_data_directories( data_dirs );
|
||||
|
||||
if (spec->characteristics & IMAGE_FILE_DLL)
|
||||
{
|
||||
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)
|
||||
output( "\t.lcomm %s,4\n", asm_name("_end") );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue