Alexandre Julliard : winebuild: Support building krnl386.exe in PE format.
Module: wine Branch: master Commit: 2746797ad5aee4df3b6f4736ad1aba571af7a361 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2746797ad5aee4df3b6f4736a... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 2 10:49:56 2020 +0200 winebuild: Support building krnl386.exe in PE format. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/relay.c | 5 +++-- tools/winebuild/spec16.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 3b1f4cd18e..29d0a74c83 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(a)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 3a7e457282..a52c03aaa6 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) {
participants (1)
-
Alexandre Julliard