Module: wine Branch: master Commit: a4677fa23aceabd0158edd816baa43c5f163dd64 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a4677fa23aceabd0158edd816...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 15 17:49:09 2020 +0200
winebuild: Only generate a constructor for dll modules.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
tools/winebuild/main.c | 2 +- tools/winebuild/spec32.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 81f7678eae..db8587c3bd 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -386,7 +386,7 @@ static void set_exec_mode( enum exec_mode_values mode ) static const char *get_default_entry_point( const DLLSPEC *spec ) { 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"; return "__wine_spec_exe_entry"; } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index ecfe4c5011..631a467a5e 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -680,7 +680,8 @@ void output_module( DLLSPEC *spec )
output( "\n\t.data\n" ); 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( "\t.long 0x4550\n" ); /* Signature */ @@ -749,13 +750,16 @@ void output_module( DLLSPEC *spec )
output_data_directories( data_dirs );
- 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 ); + 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") ); - - output_asm_constructor( "__wine_spec_init_ctor" ); }