Alexandre Julliard : winegcc: Use the CRT startup code also for non-PE builds.
Alexandre Julliard
julliard at winehq.org
Wed Apr 15 15:55:42 CDT 2020
Module: wine
Branch: master
Commit: 3622b9ab153ce792aa3add8d3aa71b487edfda9a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3622b9ab153ce792aa3add8d3aa71b487edfda9a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 15 16:06:22 2020 +0200
winegcc: Use the CRT startup code also for non-PE builds.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winegcc/winegcc.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index d663103186..7d55e19866 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1187,19 +1187,16 @@ static void build(struct options* opts)
/* set default entry point, if needed */
if (!opts->entry_point)
{
- if (is_pe)
+ if (opts->subsystem && !strcmp( opts->subsystem, "native" ))
+ entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_DriverEntry at 8" : "DriverEntry";
+ else if (opts->use_msvcrt && !opts->shared && !opts->win16_app)
{
- if (opts->subsystem && !strcmp( opts->subsystem, "native" ))
- entry_point = opts->target_cpu == CPU_x86 ? "_DriverEntry at 8" : "DriverEntry";
- else if(opts->use_msvcrt && !opts->shared && !opts->win16_app)
- {
- if (opts->unicode_app)
- entry_point = opts->target_cpu == CPU_x86 ? "_wmainCRTStartup" : "wmainCRTStartup";
- else
- entry_point = opts->target_cpu == CPU_x86 ? "_mainCRTStartup" : "mainCRTStartup";
- }
+ if (opts->unicode_app)
+ entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_wmainCRTStartup" : "wmainCRTStartup";
+ else
+ entry_point = (is_pe && opts->target_cpu == CPU_x86) ? "_mainCRTStartup" : "mainCRTStartup";
}
- else if (!opts->shared && opts->unicode_app)
+ else if (!is_pe && !opts->shared && opts->unicode_app)
entry_point = "__wine_spec_exe_wentry";
}
else entry_point = opts->entry_point;
More information about the wine-cvs
mailing list