diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 34761ea4c5d..da9ad620225 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -475,6 +475,7 @@ static int has_stubs( const DLLSPEC *spec ) static void add_extra_undef_symbols( DLLSPEC *spec ) { add_extra_ld_symbol( spec->init_func ); + if (spec->type == SPEC_WIN16) add_extra_ld_symbol( "DllMain" ); if (has_stubs( spec )) add_extra_ld_symbol( "__wine_spec_unimplemented_stub" ); if (delayed_imports.count) add_extra_ld_symbol( "__wine_spec_delay_load" ); } diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index 9822456fe57..54fffd8a1b2 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -836,6 +836,7 @@ void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ) spec32->file_name = xstrdup( spec16->file_name ); spec32->characteristics = IMAGE_FILE_DLL; + spec32->init_func = xstrdup( "DllMain" ); /* add an export for the NE module */