diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 3b1f4cd18e0..29d0a74c833 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -379,9 +379,10 @@ static void BuildCallFrom16Core( int reg_func, int thunk ) static void BuildCallTo16Core( int reg_func ) { const char *name = reg_func ? "wine_call_to_16_regs" : "wine_call_to_16"; + const char *func_name = (target_platform == PLATFORM_WINDOWS ? strmake( "%s@12", name ) : name); /* Function header */ - function_header( name ); + function_header( func_name ); /* Function entry sequence */ output_cfi( ".cfi_startproc" ); @@ -523,7 +524,7 @@ static void BuildCallTo16Core( int reg_func ) output( "\tlret\n" ); /* Function footer */ - output_function_size( name ); + output_function_size( func_name ); } diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c index 3a7e457282a..a52c03aaa6a 100644 --- a/tools/winebuild/spec16.c +++ b/tools/winebuild/spec16.c @@ -825,7 +825,7 @@ void output_spec16_file( DLLSPEC *spec16 ) output_stubs( spec16 ); output_exports( spec32 ); output_imports( spec16 ); - if (is_undefined( "__wine_call_from_16" )) output_asm_relays16(); + if (!strcmp( spec16->dll_name, "kernel" )) output_asm_relays16(); if (needs_get_pc_thunk) output_get_pc_thunk(); if (spec16->main_module) {